I was just thinking about an alternative to modal processing, because I have a
stack I want to be modal just so I can interrupt the flow of the calling
program. However, if I throw an error while modal, say a database connection
error which I occassionally get because I am using an iffy wireless router, I
cannot interact with the debugger.
What I was thinking is having a toggle variable that contains something like
“pre” or “post”. The handler that calls the stack would have two sections. One
“if pModal is ‘pre’ the other “else — if pModal is “post”.
Now in the calling openStack handler I would get the object that opened the
stack and the handler that opened it. Once done, I would send the handler with
the arguement “post” in time, then close the stack. I can pass data back and
forth with the dialogData.
Using this method I can avoid the issues that come with calling a stack as
modal, especially during development. I could also have the advantage of
calling multiple stacks “pseudo-modally” without the stacks interfering with
each other.
Bob S
On Jul 24, 2015, at 02:52 , Mark Waddingham m...@livecode.com wrote:
I am not sure, what my loop will be doing, while I opened modal the answer
window? Will the loop wait for the user answer in the modal window in both
above cases, or is the modal window completely independent from the loop and
the loop runs on? How can I hold my loop waiting for the user action in the
modal window?
When you 'modal' a stack, the modal command will block the current script
until the dialog closes. (e.g. You have an OK / Cancel button which do 'close
this stack').
Note that messages *are* dispatched whilst this blocking occurs - otherwise
events wouldn't get processed so you wouldn't have any user interaction.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
___
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