Hi Mark, I use a separate on startup handler in the stack script to set the allowed orientations.
on startUp --portrait,portrait upside down,landscape left,landscape right iphoneSetAllowedOrientations "landscape left,landscape right" end startUp Looking at your script, you added spaces after the commas…. in your comma-delimited list…. you can't do that. be well, randy hengst ----- On Nov 26, 2011, at 4:17 PM, Mark Smith wrote: > Further to this I just wanted to add the following: > > "To configure which orientations your application supports use: > iphoneSetAllowedOrientations orientations > Here orientations must be a comma-delimited list consisting of at least one > of portrait, portrait > upside down, landscape left and landscape right. The setting will take > effect the next time an > orientation change is effected – the interface's orientation will only be > changed if the new > orientation is among the configured list. You can query the currently > allowed orientations with the > iphoneAllowedOrientations() function." > > I added the following code to my stack script: > on preOpenStack > if the environment is "mobile" then > iphoneSetAllowedOrientations "portrait, portrait upside down, > landscape left, landscape right" > end if > end preOpenStack > > global ncnt > on orientationchanged > global ncnt > put ncnt + 1 into ncnt > put ncnt & " " & iphoneallowedorientations() into fld "Selected" on card > "home" > end orientationchanged > > > Now, each time I rotate the iphone ncnt is incrementing (1,2,3... etc) but I > only get "portrait" reported for allowed orientations (even though I think I > have set all orientations as allowed). And of course the program is not > auto-rotating. Could someone kindly let me know what it is I am doing wrong? > > Many thanks > > -- Mark > > (LC version is 5.0.2 although I think the same problem exists in .0.1) > > > -- > View this message in context: > http://runtime-revolution.278305.n4.nabble.com/auto-rotation-in-5-0-1-02-tp4111266p4111346.html > Sent from the Revolution - User mailing list archive at Nabble.com. > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode