Location of stack

Sarah Reichelt sarah.reichelt at gmail.com
Sun May 16 04:22:08 EDT 2010

On 16/05/2010, at 4:34 PM, "Paul D. DeRocco" <pderocco at ix.netcom.com> wrote:

>> From: Sarah Reichelt
>> I'm guessing your stack has a menu. On Mac stacks, Rev does some funny
>> business to hide the menu buttons off the top of the stacks window and
>> create a real Mac menu. But this doesn't happen immediately.
>> If you set the loc in a preOpenStack or startup handler, the menu bar
>> will not have been hidden yet and the stack will effectively be
>> taller. If you set the loc in an openStack handler, then the menu will
>> have been hidden and the height of the stack the same as it was when
>> you stored the loc, so it will work as expected.
>> One workaround is to check if there is a menubar and, if so, check if
>> there is a difference in height between the stack and the card. If
>> they are the same, then the menu has not yet drawn and you need to
>> compensate for this manually.
> Thanks, Sarah. If I do it in openStack instead of preOpenStack, will it
> still position the window before it's first displayed?

No, in that case, it should work fine, except that your users will see the window flash up and then move.

A compromise might be to set the loc in both handlers. Then it will appear almost in the right place and then shuffle a little bit.


More information about the Use-livecode mailing list