On 9/22/12 12:36 PM, Peter Haworth wrote:
My understanding of preOpenCard is that it happens before the stack is displayed so this behavior puzzles me.
PreOpenCard happens after the stack window is drawn and before the card is drawn. PreOpenStack happens before the stack is displayed.
"Lock screen" should really be named "lock window". It does not prevent a redraw of the entire screen, it prevents a redraw of the contents of the window. I think the docs talk about that.
If you want to position a stack before it's shown, do it in preOpenStack. Then there's no reason to lock the screen since the window hasn't been drawn yet. Actually, there's no reason to lock the screen during any "pre-" handler provided the script is dealing with the appropriate level (stack, card, or background) because that's primarily what the "pre" events are there for.
I had to move the code that adjusts the stack's topLeft into another handler and execute it via a "send in zero" command in order to get round some other issues with preOpenCard - could it be that delays the setting of topLeft long enough that it doesn't happen until after preOpenCard is done?
Probably. I'm a little lost on exactly what the problem was though. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.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