[messages] [Module Design] Re: Some initial answers for your questions

viewofheaven viewport2heaven at yahoo.com
Fri Nov 4 07:37:47 MST 2011


"Tim M" wrote:
> Using a NamedKeyStroke in place of a standard keystroke makes no
> difference whatsoever in what the keystroke (regardless of type)
> functionally does. It does/will makes things easier remembering what
> things do if you cant keep track of all your key commands and what
> they do in complex sequences 
> 
> http://www.vassalengine.org/tracker/sho ... gi?id=1928[1]
> 
> For example in the case above, I could use "Ctrl Alt O" or I could use
> "Change Owner" - they will still both do the same thing so I don't see
> what you are getting at here in using them. I think the problem here
> is something other than keystrokes

I was worried the OP would come upon a problem I faced early on: trying
to get _"some fairly complex behaviors and piece-to-piece
communication"_ working via too many functions named after keystrokes
(eg Ctrl+Alt+O, Ctrl+Alt+Shit+O, etc). Using keystrokes to name my
functions meant:

  * Using a severly limited namespace
  * Functions names could easily be mixed up, and calls were misfired




Getting the OP started on the NamedKeyStroke(s) would clean up his game
module codes, and likely reduce clutter and clutter-related bugs.

[1] http://www.vassalengine.org/tracker/show_bug.cgi?id=1928


_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=26886#p26886


More information about the messages mailing list