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

fil512 ken.stevens at sympatico.ca
Thu Jul 29 10:11:17 MST 2010

"cparrott" wrote:
> Maybe I'm missing what it is you are trying to accomplish with having
> a
> delete trait and a trigger trait fire on the same keystroke, but this
> behavior I would expect out the delete trait. If you delete a piece
> you are
> telling to the module to remove it completely and make it unable to be
> referenced for the rest of that session and save files. I would think
> delete
> would take precedence over other traits just to be sure it couldn't
> cause
> any undo issues like infinite loops on key strokes or circular
> references
> generating errors.
> Perhaps what you are looking for is an invisible piece that can act as
> a
> proxy for the trigger actions and send the delete keystroke to the
> real
> piece when needed.


What I'm trying to do is fix a bug in someone else's module.  It's a
monster module with over 5000 traits (Through the Ages).  As someone
completely new to VASSAL, I've probably bitten off more than I can chew
here, but I am confident that if I can just learn the rules that govern
trait execution that I WILL be able to fix this bug.  It's been harder
than I expected to learn the rules that determine the order traits are
executed in.  I keep hearing about general rules, and then guesses at
exceptions to those rules, but no-one seems to really know how it works.
 For example, above you write, "I would think delete would take
precedence over other traits."  You're making a guess when you say this.
 Programming shouldn't be about guesswork.  The rules about how VASSAL
works should be clear: no guessing; so we can all just get on with the
business of building modules.

 Your suggestion to use an invisible piece is intriguing.  Someone
earlier suggested I use a Dynamic Property.  There are probably other
ways to skin this cat too.  But I want to pick the "proper" solution. 
And in order to do that, I need to know the rules that govern trait
order execution.  Surely someone in the VASSAL community knows the
answer to that question without guessing...  Anybody?


Read this topic online here:

More information about the messages mailing list