Create account / Log in

Is clone / delete report not working?

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Is clone / delete report not working?

Postby grouchysmurf » March 31st, 2019, 7:56 pm

Counter has C-C (clone) and C-D properties and report on C-C and C-D. There is numbered hex grid.

When reporting, it fails to print out its location (none of oldLocation, location, Location or newLocation works).

I found some old threads in which it said that clone / delete reporting is bugged / not working. Is it really so?
User avatar
grouchysmurf
 
Posts: 138
Joined: August 9th, 2011, 7:48 pm

Re: Is clone / delete report not working?

Postby JoelCFC25 » April 1st, 2019, 1:34 pm

This is a longstanding problem. Use a Trigger as a workaround (do the report first, then the actual Clone/Delete) to bundle it all into a single keystroke.
JoelCFC25
 
Posts: 708
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Is clone / delete report not working?

Postby grouchysmurf » April 3rd, 2019, 6:30 pm

Hm, I am not sure if I understand.

Say, I have Delete with shortcut "del"; report action triggering on keystrokes "repdel". Trigger action would then bundle them. But what key shortcut should be assigned to Trigger action? C-D? In the menu I would then have Trigger Action with C-D and Delete with no shortcut--not really what I am for.
User avatar
grouchysmurf
 
Posts: 138
Joined: August 9th, 2011, 7:48 pm

Re: Is clone / delete report not working?

Postby JoelCFC25 » April 3rd, 2019, 8:08 pm

The Trigger gets the keystroke you want to expose to the user (e.g. Ctrl-D), and the menu text "Delete".

The Trigger performs 2 keystrokes one after the other. The first is something bound to the Report Action trait. This is what makes the piece tell its current location--because you haven't deleted it yet. The second keystroke does the actual deletion. Use a named keystroke here or something the user is not likely to do on their keyboard, and crucially, leave the Command Name (that is, the menu text) blank.
JoelCFC25
 
Posts: 708
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Is clone / delete report not working?

Postby shilinski » April 3rd, 2019, 8:43 pm

I had this problem a long, long time ago, so I’m my memory is vague, but I remember getting different behavior depending on how I ordered the traits in the trait list. You might try putting the reports all before or after the delete. Mine are always last in the list, and I don’t remember having problems. But I may be just a crazy old fool.
shilinski
 
Posts: 169
Joined: December 22nd, 2007, 8:46 am
Location: Laurel, Maryland

Re: Is clone / delete report not working?

Postby Tim M » April 3rd, 2019, 9:53 pm

Traits are executed from the bottom, going to the top up.

If there was a prototype in the middle of the trait list somewhere, once the execution hits it it will perform the traits in the prototype the same way and then return and continue with the current trait list where it left off.
There are a couple of exceptions to this (namely Triggers) but otherwise this is the general gist of it

This makes nesting of prototypes and traits critical for successful complex feature execution if you want to do some really hair raising stuff! :)
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1812
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Is clone / delete report not working?

Postby grouchysmurf » April 4th, 2019, 8:02 am

JoelCFC25 wrote:leave the Command Name (that is, the menu text) blank.


That's it! That's the trick I completely forgot about. That will do, thanks.
User avatar
grouchysmurf
 
Posts: 138
Joined: August 9th, 2011, 7:48 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 3 guests