Properties not as per help file

G’day all,

Whilst using the Report Action trait to test out some functions, I noticed that some of the properties you can insert into the “Report format” area were incorrect and did not match what is displayed in the help file.

These include oldMapName, mapName & oldLocation instead of OldMap, CurrentMap & oldLocationName respectively. I haven’t noticed any others.

Could you describe this problem in more detail please:

  • What was displayed by the ‘incorrect’ properties
  • What where the ‘correct’ properties
  • What was the full property string
  • What generated the keyStroke that you are reporting on?

B.


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

Post generated using Mail2Forum (mail2forum.com)

Further tests have shown that my initial analysis was incorrect.

Firstly, in the Report action trait, under the Report format section, the Insert drop down menu lists mapName, oldMapName, location & oldLocation as properties that can be inserted into the message.

I have found that $oldLocation$ returns the same value as $location$. Also, oldMapName returns the same value as mapName when moving a piece from one map to another.

To check this, I used the properties stated in the Help file to get these values, namely $OldLocationName$ and $OldMap$. I replaced $oldLocation$ with $OldLocationName$. $OldLocationName$ correctly displayed the previous location of the piece. I did the same check with $oldMapName$ by replacing it with $OldMap$. $OldMap$ correctly displayed the previous map of the piece if it was moved from another map.

For the second point, I believe it would be more consistent to have the properties that you can insert into the Report action message format reflect what is available in the Help file rather than have different names doing the same thing. For example $CurrentMap$ is what is displayed in the Help file yet the Insert menu in the Report action message format area has $mapName$, which reports exactly the same thing.

A similar situation exists in the Map window Auto report message format areas. E.g. $previousMap$ and $previousLocation$ could be replaced with $OldMap$ & $OldLocationName$.

Hope that’s clearer.

LB

Report Action reports the current state of a given piece at a given point in time and is initiated by a Key Command (Say Ctrl-P). The property names available in the drop-down list such as oldMapName and oldLocation refer to the values of MapName and Location immediately prior to the Ctrl-P being executed. This is handled by the Report Action trait itself. If the Ctrl-P key does not actually cause the piece to move, then MapName will equal oldMapName and location will equal oldLocation

In your case, you are moving a piece manually from one map to another, then the Ctrl key is being executed that results in the Report Action firing. But the piece is already on the new map BEFORE the Ctrl key is run.

Now, OldMap and OldLocationName are something completely different. These are properties (along with OldX, OldY, OldBoard and OldZone) are set by the Piece Mover to the values prior to a piece being manually moved. See the reference page for the Basic Piece.

Yes, there could be more consistency (and there is already an RFE in the system to improve consistency), but there are two completely different things being reported:

OldMapName = Map Name prior to the execution of the Control Key that has caused a Report Action to fire. Can only be used in a Report Action trait.
OldMap = Map prior to last movement of the piece. This is a Basic Piece Property that can be used anywhere.

B.

*********** REPLY SEPARATOR ***********

On 3/09/2009 at 9:38 PM LurchBrick wrote:


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

Post generated using Mail2Forum (mail2forum.com)

Thanks for clearing that up Brent.

I played around with using oldMapName and oldLocation in the Report Action trait but couldn’t get them to be different irregardless of the various tests I tried. Maybe I’m not using it right.

Not that it matters as I will just use OldMap and OldLocationName. Are oldMapName and oldLocation actually useful for certain events when you can just use OldMap and OldLocationName?