How to dismiss a modal dialog (was: Re: Ask & Answer)
Klaus Major
klaus at major-k.de
Sun May 27 11:12:36 EDT 2007
Hi Joe,
> Hi again everyone,
>
> OK, so I’ve created a modal stack that ignores everything else.
> That’s good.
> Now how do I transfer data from that modal stack to the continuing
> script
> that opened the modal stack? Maybe dialogData has something to do
> with that but I
> don’t understand that command.
"the dialogdata" is a built-in global variable, so no need to declare
it.
In your modal stack you can fill this variable when closing the modal
stack
and tehn retireve this variable in the following lines of your script.
Example:
In your modal stack "yourmodalstack" you have a field "field 1" where
the user can enter something.
Then you can put this into your "OK" (or whatever button closes your
modal stack) button script:
on mouseup
set the dialogdata to fld "field 1"
close this stack
end mouseup
In your script that opens the modal stack:
on mouseUp
modal stack "yourmodalstack"
## now you can check "the dialogdata"
answer the dialogdata
## or whatever...
end mouseUp
You get the picture .-)
> Joe
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list