Standalone cuts off stack
Frank D. Engel, Jr.
fde101 at fjrhome.net
Tue Dec 21 07:07:52 CST 2004
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.
> use-revolution mailing list
> use-revolution at lists.runrev.com
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
$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
More information about the use-livecode