Orientation

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
conde
Posts: 51
Joined: Sun Nov 27, 2011 10:41 am
Location: Stuttgart, Germany

Orientation

Post by conde » Sat Feb 04, 2012 1:34 am

Hello, maybe someone can help me?
In openstack message I put

Code: Select all

 iphoneSetAllowedOrientations "landscape left, landscape right"
now it goes to substacks "iphoneStack" or "iPadStack".

In the simulator iPad it works fine but not in iPhone (Retina). No resizing or any other things. Any idea?

Thanks ... Guera

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5409
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Orientation

Post by jacque » Sun Feb 05, 2012 12:42 am

Remove the space after the comma.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

conde
Posts: 51
Joined: Sun Nov 27, 2011 10:41 am
Location: Stuttgart, Germany

Re: Orientation

Post by conde » Sun Feb 05, 2012 1:33 am

Sorry jacque - This has no effect.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Orientation

Post by Dixie » Sun Feb 05, 2012 2:55 am

conde...

You are missing the quotation marks... this is what you have scripted

Code: Select all

iphoneSetAllowedOrientations "landscape left, landscape right"
try...

Code: Select all

 iphoneSetAllowedOrientations( "landscape left", "landscape right")
be well

Dixie

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5409
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Orientation

Post by jacque » Sun Feb 05, 2012 3:36 am

I use this in several stacks:

mobileSetAllowedOrientations "landscape left,landscape right"

It works for me (but when I had a space in it, it failed.) The dictionary has the same syntax. The "iphoneSetAllowedOrientations" is an older implementation that is now supposed to be a synonym of the "mobile" variety, but maybe that's not so.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

conde
Posts: 51
Joined: Sun Nov 27, 2011 10:41 am
Location: Stuttgart, Germany

Re: Orientation

Post by conde » Sun Feb 05, 2012 11:10 am

Unfortunately, no change here.

I'm using the script of ncmac and Dixie http://forums.runrev.com/viewtopic.php?f=49&t=8119

Code: Select all

--Put this in the card script of the first card:

on preOpenStack
set the visible of this stack to false -- hide it
end preOpenStack

on openStack -- it's still invisible
getTheDevice -- your substack opens here; it is visible
end openStack

--This is in the stack script

on getTheDevice
put the machine into tDevice
switch tDevice
case "iPhone Simulator"
case "iPhone"
case "iPod Touch"
go to stack "iPhonestack"
break
case "iPad Simulator"
case "iPad"
go to stack "iPadStack"
break
end switch
end getTheDevice
Thanks ... Guera

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Orientation

Post by Dixie » Sun Feb 05, 2012 11:18 am

Jacque...

You are quite correct... perhaps my daughters are right, that I am not 'keeping up' with the changing times... I will change the lines in my scripts accordingly.

be well

Dixie

conde
Posts: 51
Joined: Sun Nov 27, 2011 10:41 am
Location: Stuttgart, Germany

Re: Orientation

Post by conde » Sun Feb 05, 2012 11:25 am

ooops - got it to work:

Code: Select all

on openstack
  --mobileSetAllowedOrientations "landscape left,landscape right"
end openstack

on getTheDevice
put the machine into tDevice
switch tDevice
   case "iPhone Simulator"
case "iPhone"
case "iPod Touch"
    mobileSetAllowedOrientations "landscape left,landscape right"
    go to stack "iPhonestack"
break
case "iPad Simulator"
case "iPad"
    mobileSetAllowedOrientations "landscape left,landscape right"
    go to stack "iPadStack"
break
end switch
end getTheDevice
... Guera

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5409
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Orientation

Post by jacque » Sun Feb 05, 2012 6:28 pm

Don't let it eat you up, Dixie, that's my flaw and you can't have it. :P
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “iOS Deployment”