When Does an Open Stack Not Send openStack?

Wouter wouter.abraham at pi.be
Mon Jul 19 16:30:11 CDT 2004

> When Does an Open Stack Not Send openStack?
> 	• 	From: Dan Shafer
> 	• 	 Subject: When Does an Open Stack Not Send openStack?
> 	• 	 Date: Mon, 19 Jul 2004 14:03:38 -0700
> Here's a puzzler for you.
>  My app mainStack does some stuff, gets some data from the user and 
> then has a line:
> go stack "newStack"
> The newStack stack has an openStack handler that initializes a bunch 
> of things. That handler was working fine. I made a catastrophic 
> improvement (one of my favorite pastimes) and suddenly the 
> initialization just stopped working. I debugged and found the 
> openStack handler in newStack was just never being invoked.
> Now, I created a preOpenStack handler in newStack to see if that 
> message was being sent. It was. Which confused me even more.
> So Ro Nagey and I were IMing about this and he said this is a problem 
> he's seen before. He suggested that I add a preOpenStack handler in 
> newStack and use it to explicitly send openStack to newStack. Guess 
> what? That worked.
> But why? Under what circumstances should the openStack message not get 
> sent or handled? What could I possibly have done wrong?
> There's no lockMessages set anywhere and I just can't imagine what 
> else could cause this.
> Any thoughts? I'll go with the kludge for now but I'd sure like to 
> understand what happened.
> Dan


When testing openstack handlers, it showed that handlers (preopenstack 
and openstack) in cardscripts always got the priority.
Meaning they always got executed, whereas those in the stackscript not.
If they are not in the first cardscript may be placing it there may 
change things for you.



More information about the use-livecode mailing list