Standalone cuts off stack

Martin Baxter martin at materiaprima.fsnet.co.uk
Tue Dec 21 10:55:52 EST 2004


Some time ago I made a standalone to check what happens to the stack height
when a stack with a mac menubar opens. The stack is plain vanilla except
that it has a menubar obviously. The only script is the stack script that
produces the output below.
Since the subject is sort of current I thought I would post it again.
The lesson I learn from this is that trying to mess with height in any of
these handlers while the engine is doing this stuff, will be hit and miss
and probably frustrating.

Here is the (MacOS) output:

STARTUP
scroll of stack = 0
height of stack = 421
height of card = 421

PREOPENSTACK
scroll of stack = 21
height of stack = 421
height of card = 442

OPENSTACK
scroll of stack = 21
height of stack = 400
height of card = 421

Note that
1) between startup and preopenstack the engine seems to have set the scroll
of the stack to 21 and the card height to 442 (the full height of this
particular stack)
2) between preopenstack and openstack, 21 pixels has been lopped off the
card and stack heights.

This may have changed since I made that standalone, possibly, though I
doubt it.

Martin Baxter

>I have noticed that the menubar seems to resize the stack somewhere
>between preOpenStack and openStack.  If you set the stack height in
>preOpenStack, you need to set it as if the menu bar were in the stack
>window (Windows/UNIX style), and if you set it in the openStack
>handler, you need to consider the platform and set it to the desired
>height for the platform you are on (which is a visible process).
>
>The best solution I have found is to figure out the size as on
>Windows/UNIX (go into the menu builder and set the menu bar to display
>in the window, then use the property inspector on the stack window to
>check the height), and set the height to this in the preOpenStack
>handler.  No platform checks, no visible resize -- it just works.
>
>And I have been seeing this for a while here, on a mainstack.  I
>eventually just gave up on Rev doing this one right in a standalone (I
>occasionally saw the stack resized incorrectly in the IDE too, but
>setting the height this way solved it for both), so I stick this into
>the "important" stacks I do to take care of that problem, which I would
>see consistently in standalone mainstacks and substacks.
>
>On Dec 20, 2004, at 8:02 PM, Sarah Reichelt wrote:
>
>>> I have a stack with a menubar. When I try to build a standalone from
>>> it, the bottom of the stack is cut off by the height of the menubar.
>>> This does not happen if I build in MetaCard, so the problem is
>>> apparently with the distribution builder.
>>>
>>> I have added a command line in a preopenstack handler to reset the
>>> stack size, but that doesn't work either. The stack consistently
>>> displays with the bottom edge missing. There are no scripts in the
>>> standalone that set the stack dimensions otherwise.
>>>
>>> Anyone know what causes this or how to fix it? For now, I am building
>>> in MetaCard.
>>
>> I stumbled across a workaround that seems very reliable. In a
>> preOpenStack handler, resize the stack relative to an object on the
>> first card. It seems that when a stack first opens, its height is
>> unaffected by the menubar and later on it is (or vice versa), so the
>> absolute pixel values for the dimensions vary, but if you use the
>> dimensions of another object to set the stack height, then it all
>> works, no matter what Rev thinks at the time.
>>
>> In one stack, I have a Mac menubar, and right at the bottom of the
>> stack window, I have a field called "Legal". In the preOpenStack
>> handler, this works perfectly:
>>
>>   set the height of stack "NG_Pod" to the bottom of fld "Legal" + 2
>>
>> In the IDE, it makes my stack too big, if it calls the preOpenStack
>> (which it usually doesn't), but I don't worry about that, since it
>> always comes good in the built app.
>>
>> Cheers,
>> Sarah
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
>-----------------------------------------------------------
>Frank D. Engel, Jr.  <fde101 at fjrhome.net>
>
>$ ln -s /usr/share/kjvbible /usr/manual
>$ true | cat /usr/manual | grep "John 3:16"
>John 3:16 For God so loved the world, that he gave his only begotten
>Son, that whosoever believeth in him should not perish, but have
>everlasting life.
>$
>
>
>
>___________________________________________________________
>$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
>10 Personalized POP and Web E-mail Accounts, and much more.
>Signup at www.doteasy.com
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list