Crybaby Interesting News
J. Landman Gay
jacque at hyperactivesw.com
Fri Feb 27 12:58:26 CST 2009
DunbarX at aol.com wrote:
> I want the utility stack to insinuate itself into the message heirarchy
> whenever I open it. In HC, I place it in use on openstack, so it receives messages
> from all stacks. In Rev, I see there are more options, and I have not learned
> enough to know which might be best, or whether one of several might do.
> But my issue here is simple, clean message passing in the way I always (HC)
> understood it. I want a stack that receives all messages from all stacks.
> Fortunately, I have it; my stack works fine. I just cannot have the msg box open at
> the same time.
> I am not experienced enough to find how this might be best implemented in
> Rev, (Stackinuse, backscripts, etc.) I just want what I consider basic
> functionality, and I want to feel that my HC expertise is valid here, at least in
> principle. I think I have found a bug. I am surprised, actually, that others are
> not more alarmed.
Light bulb just went on...maybe. You may have set up a bad loop.
Presumably the openstack handler that puts your stack in use is in the
stack script? If so, when it goes into use, it is going to catch every
openstack, including the IDE stacks, and put *those* in use too. After
that, who knows what mess will happen. You'll have duelling openstack
handlers occuring in random orders.
If that's not what's happening, then skip the rest of this. But if it
is, the short answer is to put your openstack handler, the one that puts
the stack in use, in the script of the first card of your wizard stack.
It will receive the openstack message only once when it actually opens.
When its stack script is put into use, the card script is not in the
hierarchy and won't mess with the stacksInUse.
A better approach may be to forget about stacksInUse and put your
utility handlers into a button instead. When the wizard opens, insert
the script of the button into back. This gives you more control over
which messages get caught -- only the handers in that button script will
be active and you don't have to worry about the repercussion of stack
hierarchy and system messages.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode