OK, I see what's going on now. The stack is in fact being resized as I request BUT there is a field in the stack with geometry manager settings that scale it relative to the bottom of the stack. As a result, even though the stack is being resized, it looks like it isn't because the gap between the bottom of the field and the bottom of the stack remains constant due to the geometry manager settings.
I've got around this by locking messages before adjusting the stack size and unlocking them afterwards. The only remaining weirdness is why I didn't see this when stepping through the code with debug but that's for another day! Pete lcSQL Software <http://www.lcsql.com> On Fri, Aug 24, 2012 at 5:01 PM, <dunb...@aol.com> wrote: > It has become standard practice to: > > > send yourMessage in 0 millisec > > > instead of > > > just put some code after openCard/openStack,etc types of handlers. I hate > that this might be so, but it seems to account, or at least forgive, > certain timing and event queue issues that are inherent in those types of > messages. > > > Try it. I don't think there is a formal methodology for it all, it just > seems to work. The fact that you can step through code, but not execute in > real time, makes me think it could solve the problem. > > > Craig Newman > > > > -----Original Message----- > From: Peter Haworth <p...@lcsql.com> > To: How to use LiveCode <use-livecode@lists.runrev.com> > Sent: Fri, Aug 24, 2012 6:09 pm > Subject: Problem resizing a stack > > > A stack I'm working on has a group at the bottom that, at startup, needs to > be hiddenor visible depending on preference setting. > > I want to adjust the bottom of the stack depdning on whether the group is > hidden or not. > > In a preOpenCard handler, if the preference requires the group to be > hidden and it is not already hidden, I get the stack's rectangle, subtract > the height of the group from item 4 of the rectangle, then set the stack's > rectangle to the new value. > > When I step through the code that does this in debug, the stack height > changes correctly, but when the code is executed without a debug > breakpoint, the bottom of the stack doesn't change position. > > Is there some timing issue I need to be aware of when changing stack sizes > like this? > > Pete > lcSQL Software <http://www.lcsql.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 > > > _______________________________________________ > 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 > _______________________________________________ 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