Updating stack without going to it

Mark Swindell mdswindell at cruzio.com
Thu Nov 8 22:49:27 EST 2007


Thanks Jim and Ian.

Maybe I've got a handle on the recursion, I don't know.

But maybe you or others can explain the following.  I simplified my  
setup and recreated the following scenario:

A main stack with a field, and two substacks: FirstSub, SecondSub

At the stack level in the main stack ("The Main One") I have this  
script:
on updateNavCard
     go stack "the main one"
     put "hello"&return after field 1
end updateNavCard

At the stack level of each of the sub stacks I have this:
on resumeStack
     updateNavCard
end resumeStack

Now I toggle back and forth between the two substack windows.
First two toggles a suspendstack and resumestack is sent and hello  
appears.
Next two toggles only a suspendstack is sent and no "hello" appears.
Then two more "hellos"
Then two no hellos.
And so on.

This is confirmed in the message watcher (and by the way, how do you  
export its contents?).

Why isn't a resume stack sent each time?

Thanks
Mark




On Nov 8, 2007, at 8:52 AM, Jim Ault wrote:

> On 11/8/07 7:49 AM, "Mark Swindell" <mdswindell at cruzio.com> wrote:
>
>> Can one make visible changes to a stack (change card, update field
>> propeties) without actually going to the stack?
>>
>> I have a situation where I'm trying to update a navigation stack
>> (which is the mainstack) to reflect having selected any of multiple
>> open substacks.  I'm using a resumeStack handler to accomplish
>> this .  The problem is that I get into a recursive situation, as
>> every time the resumeStack goes out and updates the navigationStack,
>> it has to return to the substack and the resumeStack is called again,
>> and around we go.
>>
>> I know this should be simple, but I'm not getting it.
>
> I have used this before, but not with resume stack, so I cannot say  
> I have
> seen your particular setup, nor have I seen the recursion.
>
> put "something" into fld "displayData" of stack "Status View"
>
> set the selection of field "stackList" of stack "mainNav" to 3
>
> ...  but not using suspend/Resume Stack.
>
> Hope this helps.
>
> Jim Ault
> Las Vegas
>



More information about the use-livecode mailing list