Create account / Log in

question about delete and order

Discussion area for the development team.

Moderators: Tim M, uckelman

Re: question about delete and order

Postby fil512 » July 30th, 2010, 2:03 am

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
fil512
 
Posts: 160
Joined: June 27th, 2010, 5:10 pm
Location: Toronto

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

Postby uckelman » July 30th, 2010, 9:21 am

Thus spake fil512:
>
> 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...
>

We have a wiki. I begged and pleaded to get someone to help organize it,
to no avail. All of the manuals are supposed to be in the wiki. You
could help with this, if you wanted.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8137
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

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

Postby mkiefte » July 30th, 2010, 9:37 am

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 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
>
>

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@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


User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

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

Postby mkiefte » July 30th, 2010, 9:39 am

Joel, I'm not getting all the posts. I never got this response from Ken.

- M.

P.S.: Is there a Reference Manual guy?

On 30 July 2010 06:21, Joel Uckelman wrote:

> Thus spake fil512:
> >
> > 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...
> >
>
> We have a wiki. I begged and pleaded to get someone to help organize it,
> to no avail. All of the manuals are supposed to be in the wiki. You
> could help with this, if you wanted.
>
> --
> J.
>

Joel, I'm not getting all the posts. I never got this response from Ken.

- M.

P.S.: Is there a Reference Manual guy?

On 30 July 2010 06:21, Joel Uckelman <uckelman@nomic.net> wrote:

Thus spake fil512:

>

> 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...

>



We have a wiki. I begged and pleaded to get someone to help organize it,

to no avail. All of the manuals are supposed to be in the wiki. You

could help with this, if you wanted.



--

J.

User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

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

Postby uckelman » July 30th, 2010, 12:20 pm

Thus spake Michael Kiefte:
>
> Joel, I'm not getting all the posts. I never got this response from Ken.
>

That's disturbing. I got it, so I know it's not a general list problem.
I'm looking into it now.

>
> P.S.: Is there a Reference Manual guy?
>

Yes, Ed Massena, who worked on the User's Guide, is also working on the
Reference Manual, but he's doing it by himself. I'd like to get all of
the bits and pieces out into the open so that more people than just Ed
can work on them.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8137
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

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

Postby mkiefte » July 30th, 2010, 2:14 pm

On 30 July 2010 09:20, Joel Uckelman wrote:

> Thus spake Michael Kiefte:
> >
> > Joel, I'm not getting all the posts. I never got this response from Ken.
> >
>
> That's disturbing. I got it, so I know it's not a general list problem.
> I'm looking into it now.
>
>
We experienced an e-mail outage recently. Might be related.

- M.



On 30 July 2010 09:20, Joel Uckelman <uckelman@nomic.net> wrote:

Thus spake Michael Kiefte:

>

> Joel, I'm not getting all the posts. I never got this response from Ken.

>



That's disturbing. I got it, so I know it's not a general list problem.

I'm looking into it now.



We experienced an e-mail outage recently.� Might be related.�

- M.

User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

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

Postby uckelman » July 30th, 2010, 2:23 pm

Thus spake Michael Kiefte:
> >
> > That's disturbing. I got it, so I know it's not a general list problem.
> > I'm looking into it now.
> >
> >
> We experienced an e-mail outage recently. Might be related.
>

We delivered your message. It looks like somebody named KIL-MX-1.UCIS.dal.ca
signed for it:

Jul 29 15:29:58 one postfix/smtp[22888]: BC1513C4: to=, relay=KI
L-MX-1.UCIS.dal.ca[129.173.1.129]:25, delay=1.3, delays=0.1/0.02/0.64/0.58, dsn=
2.0.0, status=sent (250 2.0.0 o6TMTvMF023529 Message accepted for delivery)

You'll have to take it up with him. :)

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8137
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

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

Postby mkiefte » July 30th, 2010, 2:31 pm

Now I'm disturbed.

- M.

On 30 July 2010 11:23, Joel Uckelman wrote:

> Thus spake Michael Kiefte:
> > >
> > > That's disturbing. I got it, so I know it's not a general list problem.
> > > I'm looking into it now.
> > >
> > >
> > We experienced an e-mail outage recently. Might be related.
> >
>
> We delivered your message. It looks like somebody named
> KIL-MX-1.UCIS.dal.ca
> signed for it:
>
> Jul 29 15:29:58 one postfix/smtp[22888]: BC1513C4: to=,
> relay=KI
> L-MX-1.UCIS.dal.ca[129.173.1.129]:25, delay=1.3,
> delays=0.1/0.02/0.64/0.58, dsn=
> 2.0.0, status=sent (250 2.0.0 o6TMTvMF023529 Message accepted for delivery)
>
> You'll have to take it up with him. :)
>
>

Now I'm disturbed.

- M.

On 30 July 2010 11:23, Joel Uckelman <uckelman@nomic.net> wrote:

Thus spake Michael Kiefte:

> >

> > That's disturbing. I got it, so I know it's not a general list problem.

> > I'm looking into it now.

> >

> >

> We experienced an e-mail outage recently. �Might be related.

>



We delivered your message. It looks like somebody named KIL-MX-1.UCIS.dal.ca

signed for it:



Jul 29 15:29:58 one postfix/smtp[22888]: BC1513C4: to=<mkiefte@dal.ca>, relay=KI

L-MX-1.UCIS.dal.ca[129.173.1.129]:25, delay=1.3, delays=0.1/0.02/0.64/0.58, dsn=

2.0.0, status=sent (250 2.0.0 o6TMTvMF023529 Message accepted for delivery)



You'll have to take it up with him. :)



User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

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

Postby fil512 » July 30th, 2010, 2:42 pm

uckelman wrote:Thus spake fil512:
>
> 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...
>

We have a wiki. I begged and pleaded to get someone to help organize it,
to no avail. All of the manuals are supposed to be in the wiki. You
could help with this, if you wanted.

--
J.


I will help with getting the Reference Manual up on a Wiki. But I'm leaving for Iceland today. I'll be back mid-August. I'll follow up then.

Ken
fil512
 
Posts: 160
Joined: June 27th, 2010, 5:10 pm
Location: Toronto

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

Postby uckelman » July 30th, 2010, 2:54 pm

Thus spake fil512:
>
> I will help with getting the Reference Manual up on a Wiki. But I'm
> leaving for Iceland today. I'll be back mid-August. I'll follow up
> then.
>

Thank you! (We'd also appreciate having more dev help, *especially* if
you're interested in writing tests.)

Enjoy Iceland. If you've never been there before, it's worth going to the
Blue Lagoon.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8137
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

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

Postby fil512 » July 30th, 2010, 4:15 pm

uckelman wrote:Thus spake fil512:

Thank you! (We'd also appreciate having more dev help, *especially* if
you're interested in writing tests.)
J.


I am interested in writing tests. I am a big believer in automated testing. I designed and built the free online multiplayer strategy game http://www.strategicinitiative.org/. The code for the game is open source, hosted at Google Code http://code.google.com/p/stratinit/ (I got fed up with Sourceforge being so slow and breaking the site when they upgraded it last summer.) I worked hard to build comprehensive unit test coverage for that game. Every time a bug was reported, I would first write a failing test that reproduced the bug, and then fixed the code until the test would pass, ensuring first that the hundreds of other unit tests also still passed. After a while, you have such strong test coverage that you can make major changes to the inner workings of your code with boldness and courage, knowing that your tests will tell you whether your changes break anything.

Ken
fil512
 
Posts: 160
Joined: June 27th, 2010, 5:10 pm
Location: Toronto

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

Postby fil512 » August 12th, 2010, 2:29 am

fil512 wrote:
I will help with getting the Reference Manual up on a Wiki.



The Reference Manual is now up on the Wiki.

I have added two new sections to http://www.vassalengine.org/wiki/GamePiece. One called "Trait Order" that summarizes Brent Easton's famous post on the subject. The other is called "Keystrokes and Traits" that summarizes the outcome of the conversation in this thread.

Ken
fil512
 
Posts: 160
Joined: June 27th, 2010, 5:10 pm
Location: Toronto

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 0 guests