Returning Data from a Modal
Ben Rubinstein
benr_mc at cogapp.com
Fri Jan 11 14:35:38 EST 2013
On 11/01/2013 19:13, Andrew Kluthe wrote:
> Is there an easy way I am overlooking to return data from a modal?
>
> Something akin to:
>
> go stack "BlahBlah" as modal
> put tReturnedData
>
> How do all of you handle that in a modal? I want a modal to return
> true if followed through with or false if its canceled, so I know not
> to execute the rest of script after the modal call if it was canceled.
>
> I feel like I have done this or seen this somewhere before.
There is a global property "the dialogData" which can be used for this purpose
(both for sending data to the modal, and getting it back) and this is the
standard advice.
However in fact this is just a convention, there's nothing special about that
property except that it's not used for anything else and it has a relevant
name! So alternatively you can use a global variable, or a property of the
stack "BlahBlah", or whatever else makes sense for you.
HTH,
Ben
More information about the use-livecode
mailing list