orientation in iOS 8.1 simulator

Sean Cole (Pi) sean at pidigital.co.uk
Sun Oct 26 12:45:49 EDT 2014


Hi Klaus,

I was getting this too (from some time ago). There is a delay in the
message between 'orientationChanged' to updating the
'mobileDeviceOrientation' value. So, what I do is:

on orientationChanged
        send "checkOrientation" to me in 20 millisec
end orientationChanged

on checkOrientation
        set the rect of fld "Testfield" to the rect of this cd
        put CR & CR & mobileDeviceOrientation() into fld "Testfeld"
end checkOrientation

You can fiddle with the 'send' timing but 20 seems to suit me. It has been
highlighted to the RR team as far as I am aware but don't know if it is yet
fixed (obviously not). Maybe you can update Bugzilla if you find it.

Hope this helps you out - Nice to return the favour to you at last from the
number of times you've helped me out :-)

All the best



Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
π
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

This email and any files transmitted with it may be confidential and are
intended solely for the use of the individual to whom it is addressed. You
are hereby notified that if you are not the intended recipient of this
email, you must neither take any action based upon its contents, nor copy
or show it to anyone. Any distribution, reproduction, modification or
publication of this communication is strictly prohibited. If you have
received this in error, please notify the sender and delete the message
from your computer.



Any opinions presented in this email are solely those of the author and do
not necessarily represent those of Pi Digital. Pi Digital cannot accept any
responsibility for the accuracy or completeness of this message and
although this email and any attachments are believed to be free from
viruses, it is the sole responsibility of the recipients.


Pi Digital Productions Ltd is a UK registered limited company, no. 5255609.
VAT GB998220972

On 26 October 2014 16:03, Klaus major-k <klaus at major-k.de> wrote:

> Hi friends,
>
> I'm not getting it! Not sure if this is my fault or the simulators? 8-)
>
> OS X 10.10, LC 6.7, Xcode 6.1
>
> I have a stack 320*480 px with only one card with one field and this
> script of cd 1:
>
> ..........................................................................................................
> on orientationchanged
>    set the rect of fld "Testfield" to the rect of this cd
>    put CR & CR & mobileDeviceOrientation() into fld "Testfeld"
> end orientationchanged
>
> on resizestack
>    set the rect of fld "Testfeld" to the rect of this cd
>    put CR & CR & mobileDeviceOrientation() into fld "Testfeld"
> end resizestack
>
> on preopenStack
>    set the fullscreenmode of this stack to EMPTY
>    ## Don't care yet!
>    ## Do I have to?
> end preopenStack
>
> ..........................................................................................................
> It starts nice in PORTRAIT mode in iPhone and iPad simulator but
> when I select "rotate left/right" in the simulator menu I see what I
> exspect
> ONLY in the iPad simulator, means the display of the stack rotates!
> And I see the correct orientation in the field.
>
> But nothing happens in the iPhone simualtor, no "orientationchanged"
> gets fired, LC does not rotate and even the simulator itself actually
> doesn't!?
>
> Anyone seen this? Is the simulator still a bit buggy? It's me, right?
> Do I have to make any other setting to make this work for iPhone, too?
>
> I just want to create layouts for both orientations for iPhone and iPad
> in my app and this is just a simple test stack, no deeper meaning, just
> another
> newbie on mobile development :-)
>
> Any insights welcome, thanks a lot!
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list