Crybaby

Dave Cragg dave.cragg at lacscentre.co.uk
Thu Feb 26 15:33:54 EST 2009


Craig,


On 26 Feb 2009, at 16:54, dunbarx at aol.com wrote:
> I have another stack "B" with an "opencard" handler in the stack  
> script ,
> containing one line: "doThis". A handler "doThis" right below it has  
> nothing in
> it. On openstack, Stack "B" is put in use.

My first question was why you have an openCard handler in a "stack-in- 
use". It would seem to invite management problems, as it will trap  
*any* opencard message. (Apart from the fact that the Rev IDE consists  
of rev stacks, what would you expect to happen if you had two projects  
open at once?)

> I cannot work at all if i can't trap messages between stacks.

When I've built projects with multiple stacks, I've tended to create  
all the stacks as substacks of a single mainstack. The mainstack may  
have no user interface at all (hidden), but it can be used as a place  
to trap events for all the substacks in the project. So you can place  
an openCard handler there and be sure it will only trap openCard  
messages originating from the stacks in the project.

I don't know the nature of your project, so this idea may not be  
practical. But I'd suggest trying to avoid placing handlers for  
navigation events (openCard, etc.) in a stack-in-use.

Cheers
Dave







More information about the Use-livecode mailing list