Weird defaultStack behavior
Richard Gaskin
ambassador at fourthworld.com
Tue Feb 1 08:11:49 EST 2011
Peter Haworth wrote:
> Here's the problem.
>
> Immediately after I come out of ModalCardB, the defaultstack is set
> differently depending on whether the user filled in just the initial
> pair of controls or added more pairs.
>
> When just the initial pair of controls is used, the defaultStack is
> set to CardA's stack.
>
> When more than one pair of controls is used, the defaultStack is set
> to ModalCardB's stack, which totally messes up CardA's button
> script. I can't hard code the stack name because this is a generic
> script I want to use in many places.
>
> What could be causing this? I assume it must be something to do with
> dynamically adding and deleting controls to the modal card, but maybe
> it's a bug? If it is a bug, how can I work around it?
I've seen some anomalies with the defaultStack vs the modal command, but
I've been too busy to pin them down.
I've found that explicitly setting the default stack can help, in my
case esp. after a modal is dismissed.
It shouldn't be necessary, and if you can pin down a recipe please
submit a bug report. But as a workaround, setting the default stack
after modal seems to cover the issues I've run into here.
HTH -
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
More information about the use-livecode
mailing list