Commands explaination

user name is vbbartlett
and as per the previous post, im figured it out by… reading the directions… COMPLETELY. :blush:

Now im just trying to figure out the DeckSendToCommand class that I have to make. I feel like im swimming without a shore in sight!

So questions pertaining to that:
These are just commands that are attached to a deck, so is it a keycommand that i need to be using? What is the diff with the NamedKeyStroke?

So all I need is a key to fire this or a context menu, and it simply using a string that saves which deck name to go to right? Throw in a reportFormat string to tell the users what happend and Im good?

Does it need much more than that?

Also what is the recursionLimiter.Loopable? Should it implement that also?

Ok, you now have access to the RFE’s and Bu’s and sourceforge and the following:

2818259 Cannot report Save/Load Deck commands
2813698 Context menu to move deck to more than one place

have been assigned to you.

BTW, I can see where some of your problems with setting up eclipse stem from. When you created your own branch, you should have created a branch from Vassal-src/trunk, not Vassal-src. You have created a branch that contains the trunk, plus everyone elses branch’s, plus all tags.

It will be best if you create a new branch just from the trunk, apply the changes you have already made to the new branch, then delete the old one.

Like I said, it took me a good year before I felt I was comfortable technically with a good portion of the code. Just work on one small part at a time and get to understand it well. There are still parts of the code I just don’t venture near, since Joel and/or Rodney have a good understanding of those parts, there is generally no need.

When Deck.getKeyCommands() is called, it returns an array of KeyCommands representing all of the Actions valid for the Deck at that time. MenuDisplayer uses this to build the popup menu. You need to make sure that any addition KeyCommands for child Send To Deck components included in this list

NamedKeyStrokes are new in 3.2. They represent a KeyStroke that can have a name assigned. The Module designer can specify KeyStrokes as Names he makes up, instead of having to create large numbers of unique keys to perform different functions in Triggers etc. Vassal generates unique real KeyStrokes for each NamedKeyStroke at run time.

In general, you just use a NamedKeyStroke in the same way as a KeyStroke when defining a Hotkey. Internally, the KeyStroke processing code all still runs on KeyStrokes, calling NamedKeyStroke.getKeyStroke() to get the real KeyStroke before processing.

Best way I found when working on Vassal is to find a component that works somewhat similiar and copy what it does.

That sounds right, you should have something like:

Destination Deck:
Menu Command:
Hotkey:
Report Format:

You can copy how these are setup from similiar items in DrawPile.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

RecursionLimiter.Loopable only needs to be implemented by components that have the potential of causing an infinite keystoke loop. For example, an Action button might fire off a hotkey with runs another Action button, which fires off a hotkey that fires off the first Action button.

The SendToDeckCommand does not generate any Hotkeys, so does not need to worry about recursionLimiter.Loopable.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)