Resize stack

Ken Ray kray at sonsothunder.com
Thu Jun 10 18:15:49 EDT 2004


> >Shari, I think your scheme failes because resizestack is called in
> >the opening sequence and overwrites the saved values. I ran into 
> >this in one of my programs. If I recall, I used a global that is set 
> >after the opening ritual and the prefs file is modified only if this 
> >global says we are in normal execution mode. I posted the sequence 
> >of opening events in the thread discussing plugins not so long ago.
> >
> >Robert Brenstein
> 
> Exactly.  Though it makes no sense why it should be overwritten.  I 
> consider it to be a Metacard quirk.  I took the "save new size" out 
> of the resizeStack handler, and put it into a special handler that 
> the user must call upon in a Preferences menu.

Shari, do you have a menubar on that stack? If so, MC will automatically
send a resizeStack message when a stack with a menubar opens as it hides the
menu group. Personally, I think this is a bug, and have logged it into
Bugzilla as such, but just something for you to be aware of. What I've done
is set a global to a value just before I open the stack, and then in the
resizeStack handler check the global - if it's set, it means its just
opening, and the resizeStack sets the global to empty and bails out of
resizeStack. The next time the user actually resizes the stack, the global
is empty, so it resizes properly and allows me to store their window size.


HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the metacard mailing list