Locking Messages

Rob Cozens rcozens at pon.net
Sat Mar 4 11:10:05 EST 2006


Hi Bridger,

> I have a stack (Which I will call Stack 1) that
> makes another stack (I will call it Stack 2), copies a card from some
> other stack running in the background (which I call Stack 3) and sends
> the new stack with the copied card all over the network where it is
> added to whatever stack sees it.  The problem is that sometimes the
> card on Stack 2 has unexpected handler in it that cause random errors
> when I am working with it.  I realize I can lock the messages, but
> that locks the messages for the Stack 1 also, which I cannot do.  Is
> there any way of keeping messages from being passed to Stack 2,
> without locking the messages from Stack 1?
>

I am not sure exactly what you are describing.

If Stack 2 is created on-the-fly, where does the "unexpected" handler 
come from?  The card copied from Stack 3?

Do you have handlers with identical names in Stack 1 and 2?

If Stacks 1, 2, & 3 are all your creations, you should be able to avoid 
any duplication.

If the error is caused by broadcasting a message (eg: doWhatever), 
perhaps the problem can be avoided by directing the message to the 
correct object (eg: send "doWhatever" to card 1 of stack "Stack 1").

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)




More information about the Use-livecode mailing list