A couple of very basic Rev object questions
Doug Lerner
doug at webcrossing.com
Sun Jan 18 19:02:43 EST 2004
On 1/19/04 8:11 AM, "Sarah Reichelt" <sarahr at genesearch.com.au> wrote:
>> 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.
But the same error occurred when I renamed the handler as an openStack
handler. Maybe that also affected some other substacks that did not have
openStack handlers of their own. Of course!
doug
More information about the use-livecode
mailing list