How to tell if a modal dialog is open?

Richard Gaskin ambassador at fourthworld.com
Mon Feb 13 16:27:41 EST 2006


Peter T. Evensen wrote:
> I was really after a method to tell if any (unknown) modal stack is 
> open.  topStack gives the top-most editable stack.  I was wondering if 
> there was a way to tell if a modal dialog was being displayed.

This is an interesting question; given that modal dialogs block the flow 
of the script that opened it this rarely comes up.

Is this for managing pending messages?

You should find that "this stack" refers to the modal stack, so a script 
that asks "if the mode of this stack is 5 then" should do what you need.

Can anyone think of a case where "this stack" would not return the modal 
stack currently open?

--
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list