[messages] [Developers] Re: [Developers] Re: [Developers] Re: [Developers

fil512 ken.stevens at sympatico.ca
Thu Jul 29 15:29:53 MST 2010

"mkiefte" wrote:
> >
> > What do you mean by a "Trigger does all the inner traits first"?  Do
> you
> > mean that if a keystroke is hit that a Trigger is listening to, then
> the
> > trigger first sends that keystroke to all inner traits, then
> processes
> > the keystroke itself, and then the keystroke is sent to traits below
> the
> > Trigger?  If that is what you mean, then that would seem to
> contradict
> > the fact that triggers "always go last".  So I guess that probably
> means
> > that I don't understand what you mean by "does all the inner traits
> > first"...
> >
> I think I see where you misunderstand.
> If a trigger is listening for a keystroke, it will let all the inner
> (i.e.,
> higher) traits respond to the key first.  It will then do the
> keystrokes
> it's asked to do afterwards.  That is what I mean by triggers always
> go
> last.
> For example, a trigger is asked to respond to SHIFT-A and, in
> response, it
> sends SHIFT-B.  When it receives SHIFT-A, all the the inner traits
> respond
> to it before the trigger does SHIFT-B.

It seems to me that whether another trait is "inner" or "outer" to the
Trigger is irrelevant to the case I'm concerned with here.  If a Delete
trait is below a Trigger, and both the Delete and the Trigger are
listening for the SHIFT-A, then the Delete will still respond to the
SHIFT-A before the Trigger.  In fact, the Delete will kill the piece
before the trigger can even respond to the SHIFT-A.  So it doesn't
matter if the trait is inner or outer to the Trigger.  It seems to me
that ALL non-trigger traits, irrespective of inner or outer respond to
the SHIFT-A before the Trigger does.  That is, if I understand you

"mkiefte" wrote:
> >
> >
> > Case 1) keystroke came from outside the piece.
> > In this case, all traits listening for the keystroke execute in
> order,
> > starting with the bottom of the trait list working backwards up to
> the
> > top, with the exception being trigger actions which are always
> executed
> > last (in presumably the same order--i.e. bottom to top).
> >
> Correct, except for the trigger part.  Triggered keystrokes are done
> from
> top downwards -- the opposite of the usual.

What do you mean by a triggered keystroke?  Do you mean a keystroke sent
by the engine?  Does that apply to Action buttons and Global keystrokes
as well?  Or do you mean only keystrokes sent by Trigger Actions?  If
the latter, does it matter whether the Trigger Action is in the same
piece or a different piece?  Or does my question even make sense?

Actually that's something I've been really curious about--the scope of
key commands.  When a trait issues a key command (e.g. trigger, action,
or global key command) does that key go to ALL pieces that are listening
for that key (or in the case of global key commands, does it go to ALL
MATCHING pieces) -OR- does it only go to some pieces?  E.g. in the case
of TriggerAction does the key command only go to inner pieces?  Not
understanding this detail is likely the root of much of my confusion.

"mkiefte" wrote:
> >
> > Case 2) keystroke came from a trait within the piece.
> > Case 2a) keystroke came from a trigger
> > In this case, all traits listening for the keystroke execute in
> order,
> > starting from the one above the trigger working backwards to the
> top,
> >
> Trigger properties are activated from the top down -- i.e., after all
> the
> non-trigger traits have done their thing, the triggers then respond to
> the
> event one at a time from the top downward.  When they fire their
> keystrokes,
> they affect the game piece in exactly the same way as if you had done
> it
> externally.

Thank you.  This is very clear.  I hope the Reference Manual guy's
listening, because this is one of those facts that needs to be in the
manual.  You know, if the manual were a WIKI, I would have already added
this paragraph to it myself by now...

Struggling to understand.
The journey is taking longer than I expected.

Read this topic online here:

More information about the messages mailing list