[messages] [Developers] Re: question about delete and order

Michael Kiefte mkiefte at dal.ca
Fri Jul 30 02:37:02 MST 2010

All this is correct.

The terms inner and outer are used because that's what it's called in the
Java code.  Inner refers to something that's higher in the list and outer
refers to something that's lower in the list.  Outermost is the thing at the
very bottom which is first to receive the keystroke and respond to it.  So
bottom to top is the same is outermost to innermost.

3. is functionally correct below, but it's a simplification.  But yes, it's
correct.  Just for for clarification here's what happens in most traits:

a: receive keystroke
b: do my action if keystroke matches
c: send keystroke to piece above me

But for triggers (and ReportActions) it's like this:

a: receive keystroke
b: send keystroke to piece above me
c: if keystroke matches, send all the keystrokes I'm asked to perform to the
outermost trait in order

If you think about it, you can see why triggers are done from top down and
everything else is done from bottom up.  If you have triggers that are
activated by other triggers, it, of course, gets a little complicated.

- M.

On 29 July 2010 23:03, fil512 <ken.stevens at sympatico.ca> wrote:

> OK, I think I'm getting really close to getting this now.  Let me see if
> I've got it right.
> 1. When a keystroke enters a piece, the traits are visited in a
> particular order to see if they're interested in that keystroke, and if
> they are interested, they execute.
> 2. When a keystroke enters a piece, the behaviour is identical
> irrespective of the origin of that keystroke.  The keystroke could have
> come from the player, from a global key command, from an action button,
> or from a trigger within the piece.
> 3. The order traits are visited is as follows.
> 3a. First all non-triggers are visited.  This happens starting at the
> bottom of the list going up.
> 3b. After all the non-triggers are visited, then all triggers are
> visited, starting at the top of the list of triggers going downwards.
> If that's all there is to it, then it's actually pretty simple.  "Inner"
> and "Outer" don't even enter into the picture!
> Have I got it right?
> Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vassalengine.org/pipermail/messages/attachments/20100730/9e4b5817/attachment.html>

More information about the messages mailing list