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

_______________________________________________
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

Reply via email to