errors & hierarchies (newbie)

Timothy Miller gandalf at doctorTimothyMiller.com
Wed Jun 8 19:39:57 EDT 2005


Good day,

A script in stack "xyz" says

on mouseUp
    do somestuff
    go to stack "abc"
    do someOtherstuff
end end mouseUp

stack "abc" has an openStack handler with an error in it:

On openStack
   do someStuff
   start using stack "foo"
   do someOtherStuff
   pass openStack
end openStack

The handler in stack "abc" can't find stack "foo" for some reason -- 
maybe stack "foo" is mis-named, or in the wrong place.

What happens, at least in my case, in this scenario, is that the "on 
mouseup" script in stack "xyz" generates an error, even though it 
does open stack "abc" There isn't really anything wrong with the on 
"on mouseUp" script in stack "xyz"

The openStack handler in stack "abc" doesn't execute at all, I guess, 
because it can't find stack "foo" It saved okay, because the script 
didn't know it wouldn't be able to find stack "foo" In other words, 
the synatax is okay.

Maybe the openStack handler executes each line until it gets down to 
"start using stack "foo" I'm not sure about this.

The failure of the openStack handler to execute the whole script 
creates other problems with stack "abc", but I'm busy trying to 
figure out what's wrong with the "on mouseUp" script. It seems like 
there are two errors when there is really only one. Hair-ripping 
results, though I figure it out eventually.

I'm a sub-newbie, so I'm not completely confident about any of this, 
but I've checked and double-checked.

I don't think HC worked this way. This seems to suggest that Rev 
either passes messages differently from HC, or it handles errors 
differently, or both.

Maybe there's a good reason for this, but it seems like the way HC 
handled errors made it easier to troubleshoot. I think in HC, I'd 
just get an error message that said the openStack handler in stack 
"abc" couldn't find stack "foo" I might have gotten a HC dialog box 
asking "please locate stack "foo""

Can someone clarify?

BTW, I've always wondered where "foo" came from. It seems out of 
fashion these days.


Thanks in advance,


Tim Miller


More information about the use-livecode mailing list