Orientation bug

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Orientation bug

Post by SteveTX » Thu Jun 27, 2013 12:35 pm

Type Handler: can't find handler
Object application
Line mobileSetAllowedOrientations "portrait" // set allowed orientations
Hint mobileSetAllowedOrientations

Code: Select all

on preOpenStack
  mobileSetAllowedOrientations "portrait" // set allowed orientations
end preOpenStack
If you remove the comment, then suddenly it works.

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

Re: Orientation bug

Post by Dixie » Thu Jun 27, 2013 12:46 pm

You should put the orientations in brackets, as in :-

Code: Select all

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

SteveTX
Posts: 170
Joined: Sun Jan 17, 2010 9:00 pm

Re: Orientation bug

Post by SteveTX » Wed Jul 03, 2013 6:07 pm

Tried this, still get an error when opening stack, no matter what the syntax. Appears to be a bug in LiveCode.

Code: Select all

     	executing at 10:03:06 AM
Type	Handler: can't find handler
Object	My App
Line	mobileSetAllowedOrientations("portrait", "landscape left", "landscape right")
Hint	mobileSetAllowedOrientations

Code: Select all

     	executing at 10:04:23 AM
Type	Handler: can't find handler
Object	My App
Line	mobileSetAllowedOrientations "portrait,landscape left,landscape right"
Hint	mobileSetAllowedOrientations

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Orientation bug

Post by Klaus » Wed Jul 03, 2013 8:14 pm

You see this eror in the IDE, right?

Unfotunately the desktop engine does NOT know about these commands,
so you need to use an IF THEN clause like this:

Code: Select all

...
## ONLY execute this on mobile!
if the environment = "mobile" then
  mobile_this...
  mobile_that..
end if
...
Best

Klaus

Post Reply