Page 1 of 1
Simple open stack causes an error
Posted: Wed May 07, 2008 2:42 am
by gyroscope
Hi, the following handler:
on mouseUp
open Stack "SuchandSuch"
end mouseUp
...causes an error message, all of a sudden.
Any help/comments greatly appreciated, thank you.
Posted: Wed May 07, 2008 2:50 pm
by gyroscope
Hi, my guess is that this me-newbie-Rev-twistup hasn't occured to many people at all, mainly because I'm sure the majority plan their stack/substack system well in advance (unlike me).
I've started the project from scratch, so fingers crossed things should work out this time,...

Posted: Wed May 07, 2008 11:38 pm
by gyroscope
Hi, my mistake/misunderstanding all along...
I had put an on openStack handler in the main stack, and using a beep and answer test, realised that the openStack message applies to any substacks as well...I live and learn!
So a question please: How do I write an openStack handler just for the main stack only, ignoring all substacks?
(i.e on openStack "This Stack Only"
-- set global variables ,etc initial values only
--and other first time, only time, stuff for main stack only
-- without resorting to a preferences file
end openStack)
The above using openStack "Main stack only please!" doesn't seem to work and still runs when other substacks are opened.
Thank you!

Posted: Thu May 08, 2008 3:07 pm
by gyroscope
OK, I think I've tracked it down what I need to use now:
start using and stackInUse should do the trick when I've experimented with them...I think....
Thank you for your interest anyhow. Best regards all.

Posted: Fri May 09, 2008 11:20 pm
by gyroscope
Hi, if any newcomer to the Rev language (like me) encounters this prob and can't get start using and StackInUse to work (like I can't

), there's an easy workaround (perhaps not as refined, but it works!)
If you use on PreOpenStack, OpenStack or CloseStack in your main stack, in any other sub-stacks, put the matching handlers as empty, i.e
on preOpenStack
end preOpenStack
Hope that's useful for someone, sometime!
