Is hiding a modal dialog the same as closing it?

Graham Samuel livfoss at
Sun Dec 1 07:10:34 EST 2013

In a desktop app, I have a little color palette that opens as modal, and is dismissed with an 'OK' or 'Cancel' button in the usual way after the user had picked a color and the color is placed in a global (yes, I know, it could have been a custom property). This works in general, but I'm having some trouble with the initial opening, where unexpected things happen, possibly with the defaultStack setting.

Anyway it's some time since I scripted this, and I just noticed that I don't close this stack when someone clicks 'OK", I just hide it. The effect is that the stack is dismissed, and control returns to the handler that's waiting for the setting of the global, and the program sequence continues. Is hiding really the same as closing the stack? This doesn't seem to be documented anywhere.

Has anyone any tips on this stuff? I am getting some very odd behaviour when I first open the modal, but no problems after that. There is a rather odd note by Oliver in the LC dictionary about messages that might be sent when a modal is opened, but it doesn't give a complete account of all the messages sent etc.



More information about the Use-livecode mailing list