Page 1 of 1

Turn Tracker & Global Key Command - Bug:1860940

PostPosted: December 24th, 2007, 5:09 pm
by Rindis
Repeating myself from the Yahoo group, since I've seen no response there....

I instituted a global key command in my module a while back. Now that the Turn Tracker is part of the main Vassal code, I've put that in, and I'm trying to use the same global key command there. However, despite it being set up as close as possible to the original, the one in the Turn tracker doesn't fire. Or, rather it fires, I can see the message saying it is, but nothing else happens.

Are there any known limitations on the global key commands in the turn tracker? About the only thing I can come up with is that my module uses map layers.

Also, I set the original key command with a conditional (i.e., only if a certain value is present), and I don't see any way to do that in the version on the Turn tracker.

Turn Tracker & Global Key Command

PostPosted: December 24th, 2007, 7:16 pm
by rk
I instituted a global key command in my module a while back. Now that the Turn Tracker is part of the main Vassal code, I've put that in, and I'm trying to use the same global key command there. However, despite it being set up as close as possible to the original, the one in the Turn tracker doesn't fire.

There aren't any known issues with the Turn Tracker in the latest release. You may have discovered one, but I'm afraid you haven't given enough information to identify any potential bug.

rk

Post generated using Mail2Forum (http://www.mail2forum.com)

Turn Tracker & Global Key Command

PostPosted: December 24th, 2007, 8:08 pm
by Brent Easton
Sorry Rindis,

I guess some of us are tied up with Christmas stuff and haven't been able to respond. I will have a look at this problem when I get a chance.

Regards,
Brent.

PostPosted: December 26th, 2007, 9:54 pm
by Rindis
Here's the relevant info on the original Key Command:
Description: Advance Turn
Key Command: CTRL CLOSE_BRACKET
Matching Properties: Turn = Advance
Button text: Advance Turn
Tooltip text: Increment all planet markers
Hotkey: (none)
x Suppress individual reports?

I have prototype that includes "Marker - Turn = Advance". This same prototype also has "Marker - Layer = Planets". So everything that uses this Key Command has both traits currently, but it's built so that it doesn't have to be so (in case something odd comes up later).

Here's the info from the new one inside the Turn Tracker:
Description: Advance Turn
Global Hotkey: CTRL CLOSE_BRACKET
Match properties: phase = 1: Economics
Report format: Advancing captured markers

When the turn tracker hits the Economic phase, I see the message fire, but I don't see any of the counters increment.

These counters can also exist on certain sub-maps that don't use layers. I just checked, and one's placed there don't advance either.

And as a last note, it would be nice if the Turn Tracker version could also use the "Matching property" functionality. I use CTRL CLOSE_BRACKET all over the place for hand-incrementing various numerical markers, and I'd be nice if I didn't have to re-work all of this once it is working.

PostPosted: December 30th, 2007, 3:15 pm
by bsmith
Added to the bug tracker as Bug 1860940.

PostPosted: January 17th, 2008, 11:21 pm
by Brent Easton
Hi Rindis,

I need to have a look at this module to sort this out. Is it available for download?

Thanks,
Brent.

PostPosted: January 18th, 2008, 4:33 am
by Brent Easton
Hi Rindis,

And as a last note, it would be nice if the Turn Tracker version could also use the "Matching property" functionality. I use CTRL CLOSE_BRACKET all over the place for hand-incrementing various numerical markers, and I'd be nice if I didn't have to re-work all of this once it is working.


I don't quite understand this comment. Could you please elaborate exactly what you want to see happen?

Thanks,
Brent.

PostPosted: January 18th, 2008, 4:45 am
by Brent Easton
Hi Rindis,
Now that the Turn Tracker is part of the main Vassal code, I've put that in, and I'm trying to use the same global key command there.

I think I have just realised what the problem is. The component in the Turn Tracker is a Global Hotkey, not a Global Key Command.

A Global Key Command sends a Key Command to counters on the map selected by the specified Matching Properties. The Matching properties are applied to each and every counter in the game and the values are replaced by the values stored in the counters.

A Turn Tracker Global Hotkey sends a Key Command to the top-level components (like windows, toolbar buttons) that are listening out for Hot Keys. The Matching Properties are evaluated each time the turn tracker is changed using the values as known by the Turn Tracker. You can use the properties used to store each turn level, or any other Global Properties you have specified. A Global Hotkey never sends anything directly to counters.

What you need to do is to keep your original Global Key Command in place, but specify no icon or button name so that it does not appear on the toolbar. Also give it a Hot Key to listen out for (e.g. F6). Then set the Global Hotkey in the Turn Tracker to issue F6 when the appropriate Turn comes around.

Regards,
Brent.

PostPosted: February 5th, 2008, 8:17 am
by Rindis
Ah hah! I had problems following all that, but I think I got the gist of it. And I certainly get what your saying at the end. I'll have to try it out as soon as I have time. :D

Thanks for your help!

Recommendation for future help document: difference between a Global Hotkey and Global Key Command. :? My first time really trying to do anything with either, so I didn't know they were two different things, not just two names for the same thing.

PostPosted: February 6th, 2008, 7:46 am
by Rindis
Tried it out, works great! Thanks!