Communication between modal stack and main stack

Jan Sælid selid at broadpark.no
Fri Nov 4 06:13:50 EST 2005


Thanks alot Xavier

(This is really an immensely useful and fast mailing list!!!)

I have never used the control keyword before.
How does it work? Do you use it like "control 5" instead of "Button "Hitme".

(It's funny how dumb you feel in some areas - and how smart in 
others.....;-) )

regards
Jan

> Hi Jan
>
> What i do in these cases is to have the mainstack
> call a prep handler to setup the modal stack's info.
>
> When the user clicks on in the Modal stack, there
> is a handler in the modal that can do 1 of two things:
>
> 1: set a global array to retrieve the information
> 2: send a call to the main stack to send it the information (same process
> as the main stack calling the modal stack).
>
> now, the handler CAN return information.
>
> on dothis
>  get that
>  return it
> end dothis
>
> and the calling handler can do
>
> dothis
> get the result -- where information is returned.
>
> As for the missing background, you can always specify control thisone of
> background thatone of stack mymainstack...
>
> cheers
> Xavier
>
>> Hi
>>
>> I use several modal stacks  to communicate with the user.
>> My first question is:
>>
>> Is there a way to pass informasjon from a modal stack back to the
>> function on the stack that
>> opened it? Like "Return"? I use a custom property for now....
>>
>> When the modal stack closes the function in the main stack that
>> opened it continues. Just what I want. But for the remaining message
>> path in the function
>> I have to refer to the main stack - even if the fuction resides in
>> the main stack. Or else I get a background not found error.
>>
>> How can I prevent this. Do I need to set the focus back on the main
> stack?
>>
>>
>> Jan 




More information about the use-livecode mailing list