Orientation

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Orientation

Post by conde »

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: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Orientation

Post by jacque »

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

Re: Orientation

Post by conde »

Sorry jacque - This has no effect.
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Orientation

Post by Dixie »

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: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Orientation

Post by jacque »

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

Re: Orientation

Post by conde »

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

Re: Orientation

Post by Dixie »

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

Re: Orientation

Post by conde »

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: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Orientation

Post by jacque »

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