A couple of very basic Rev object questions

Sarah Reichelt sarahr at genesearch.com.au
Sun Jan 18 18:11:05 EST 2004


> I did find one error occurring though. I had an "go stack" command in 
> my
> "openCard" handler. When I moved the handler to the stack script that 
> line
> causes a repeated error (I tried changing it to an openStack handler
> instead, but the same error occurs):
>
>          executing at 12:01:49 PM
> Type    Handler: error in statement
> Object    mainstack
> Line    go stack "onlineStack" as topLevel
> Hint    openStack
>
>
> That line causes no problem when in the card script instead.
>
> Any idea why?

I would guess that the problem occurs when the script is in the stack 
script of your mainStack. It then gets called by ANY openCard message 
in any of the substacks as well as the mainStack. The solution, as you 
have discovered, is to put the handler in the card script instead, 
where it is only available to it's own stack and not to any other.

Alternatively, make sure all the substacks have their own openCard 
handler, even if it does nothing. That way the mesage will get trapped 
and not proceed up the hierarchy.

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/



More information about the use-livecode mailing list