Is hiding a modal dialog the same as closing it?

Graham Samuel livfoss at mac.com
Sun Dec 1 17:54:46 EST 2013


Thanks Jacque

The odd thing to me, though, is that if you hide a modal dialog rather than closing it, then it seems that the modal behaviour, where the dialog stops the action of the calling handler, ceases as if the dialog had been closed. That's really what my query was about. In the end I found that too many strange things were happening using 'hide', so I corrected my script to use 'close', and I've made sure I've soaked up the various 'open' messages each time through as I really don't want them in my particular app. Really I'm using the modal dialog to let someone pick from a limited range of colours by clicking on a graphic rather then using a menu, so I don't want the stack to do any more or less to interrupt the flow than say an 'answer' dialog does. So these added messages were something I was trying to avoid. Never mind, it seems to be working now.

Thanks again for your help.

Grraham

On 1 Dec 2013, at 19:23, J. Landman Gay wrote:

> On 12/1/13 6:10 AM, Graham Samuel wrote:
>> Is hiding really the same as closing the stack?
> 
> No, they're different. Hiding a stack just removes it from view but it remains in the message path and in the openStacks. Closing a stack removes it from the message path and from the openStacks.
> 
> A hidden stack that is re-shown later will not receive any of the "open*" messages because it is already open, it just isn't being drawn on screen. A closed stack will receive all the open* messages because it really is opening again.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list