Page 1 of 1

mobileSetAllowedOrientations Problem

Posted: Mon Jul 14, 2014 9:55 pm
by gshearne
Hi,
The code snippet below is causing me problems. It was working fine and I have not made any changes. Does anyone see an issue.

The error I get is:
stack "Alfabe Kreyol": execution error at line 2 (Handler: can't find handler) near "mobileSetAllowedOrientations", char 1

on preOpenStack
mobileSetAllowedOrientations landscape
set the fullscreenmode of this stack to "exactFit"
end preOpenStack

I have also tried:
on preOpenStack
mobileSetAllowedOrientations "landscape left"
set the fullscreenmode of this stack to "exactFit"
end preOpenStack

Thanks !!

Re: mobileSetAllowedOrientations Problem

Posted: Mon Jul 14, 2014 10:13 pm
by LCNeil
Hi gshearne,

mobileSetAllowedOrientations is mobile specific syntax so running it on the desktop environment will throw an error.

You can add in some additional checks to bypass this script when not running on mobile. Something like the following will work-

Code: Select all

on preOpenStack
if the environment is "mobile" then
mobileSetAllowedOrientations landscape
end if
set the fullscreenmode of this stack to "exactFit"
end preOpenStack
let us know how you get on.

Kind Regards,


Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com

Re: mobileSetAllowedOrientations Problem

Posted: Mon Jul 14, 2014 11:19 pm
by gshearne
Thanks. That did the trick. Regards