[messages] [Module Design] Global Key Command question

Thomas Russ tar at isi.edu
Tue May 31 08:50:21 MST 2011

On May 27, 2011, at 3:33 AM, Flaney wrote:

> A GKC property key command issued is applied to OTHER pieces, right?

No.  It is issued to all pieces.  That is why it is called Global.

> I want to test for duplicates, so the piece issues a GKC (say SHIFT 1)
> matching: BasicName = $BasicName$. When the duplicate gets this
> keystroke(Trigger on SHIFT 1), it replies with its own GKC (SHIFT 2)
> matching: BasicName = $BasicName$. Finally, there is a trigger that
> responds to SHIFT 2 by issuing a Delete keystroke.
> When I test this piece, it deletes itself even though there are no  
> other
> pieces on the board. Thus I conclude that it is issuing the GKC to all
> pieces including itself.
> Is there a way to exclude itself in the global issue?

I think that what you would need to do is:
   1) set a dynamic property tester on the piece itself with any, say  
   2) Make the match test be for
        BasicName = $BasicName$ & tester != SELF
        [Not sure about the exact syntax]
   3) Do your deletion
   4) remove the dynamic property test = SELF

More information about the messages mailing list