Turn Tracker 1.8 & V2.9.9 vs V3.0 embedded Turn Tracker

Hello,

I ran into a ‘bug’ and a strange thing with the new Turn tracker.

First the ‘bug’ : If the mouse is moved even 1 pixel between the press of the mouse button and its release (when clicking on - + to change turns) the click is not taken into account. I would have thought that as long as the mouse is still on the + or - button when the mouse button is depressed, it would work. But not. I would qualify this as a bug when compared to how buttons usually work in GUI.

Now the strange thing… (If I completely missed something important about the way it was meant to used and thus appear to be a complete fool, I will gladly accept any guidance and see the light)

To illustrate my (oh damn too long) explanation I devised a v2.9.9 test mod including the 1.8 TurnTracker component and a v3.0.x test mod using the included TurnTracker : aradiel.free.fr/vassal/TimeDisplay30).

What I want to do is to have the following structure defined as if it was in v3.0.x :

The list is formatted this way :
Level x : level of the item
“name” : Name of the item
(type) : type of the item
[content] : content of the list
Property : name of the global property set by this item

Time (turn tracker name)
Level 1 : “Year” (list) [1939,…,1945]
Property = Year
–Level 2 : “Month” (list) [January,…,December]
–Property = Month
----Level 3 : “Production” (list with 1 item) [Production]
----Property = Time_MonthPhase
------Level 4 : “Replacements” (list with 1 item) [Replacements]
------Property = Time_MonthSubPhase
--------Level 5 : empty name (list with 1 item) [ ]
--------Property = Time_TurnPhase
------Level 4 : “Reinforcements” (list with 1 item) [Reinforcements]
------Property = Time_MonthSubPhase
--------Level 5 : empty name (list with 1 item) [ ]
--------Property = Time_TurnPhase
----Level 3 : “Fortnights” (list) [Fortnight 1, Fortnight 2]
----Property = Time_MonthPhase
------Level 4 : “Weather Check” (list with 1 item) [Weather]
------Property = Time_MonthSubPhase
--------Level 5 : empty name (list with 1 item) [ ]
--------Property = Time_TurnPhase
------Level 4 : “Player turns” (list) [Allies, Axis]
------Property = Time_MonthSubPhase
--------Level 5 : “Turn Phases” (list) [Command Phase,…,Politics Phase]
--------Property = Time_TurnPhase

You’ll notice 3 “empty name” level 5 items under Replacements, Reinforcements and Weather. Those List items include a lone empty item. The net effect is that when I display in a Textlabel prototype the property linked to the level 5 list value, I don’t get the name of the property displayed instead of it content when it’s not defined.

The sequence displayed in the log window would be:

  • 1939 January Production Reinforcements
  • 1939 January Fortnight 1 Weather
  • 1939 January Fortnight 1 Allies Command Phase
  • 1939 January Fortnight 1 Allies Movement Phase
  • 1939 January Fortnight 1 Allies Combat Phase
  • 1939 January Fortnight 1 Allies Blitz Movement Phase
  • 1939 January Fortnight 1 Allies Blitz Combat Phase
  • 1939 January Fortnight 1 Allies Supply Phase
  • 1939 January Fortnight 1 Allies Politics Phase
  • 1939 January Fortnight 1 Axis Command Phase
  • 1939 January Fortnight 1 Axis Movement Phase
  • 1939 January Fortnight 1 Axis Combat Phase
  • 1939 January Fortnight 1 Axis Blitz Movement Phase
  • 1939 January Fortnight 1 Axis Blitz Combat Phase
  • 1939 January Fortnight 1 Axis Supply Phase
  • 1939 January Fortnight 1 Axis Politics Phase
  • 1939 January Fortnight 2 Weather
  • 1939 January Fortnight 2 Allies Command Phase
  • 1939 January Fortnight 2 Allies Movement Phase
  • 1939 January Fortnight 2 Allies Combat Phase
  • 1939 January Fortnight 2 Allies Blitz Movement Phase
  • 1939 January Fortnight 2 Allies Blitz Combat Phase
  • 1939 January Fortnight 2 Allies Supply Phase
  • 1939 January Fortnight 2 Allies Politics Phase
  • 1939 January Fortnight 2 Axis Command Phase
  • 1939 January Fortnight 2 Axis Movement Phase
  • 1939 January Fortnight 2 Axis Combat Phase
  • 1939 January Fortnight 2 Axis Blitz Movement Phase
  • 1939 January Fortnight 2 Axis Blitz Combat Phase
  • 1939 January Fortnight 2 Axis Supply Phase
  • 1939 January Fortnight 2 Axis Politics Phase
  • 1939 February Production Replacements
    and so on

Then to checked wether Global Properties are properly set and updated I use a piece with 5 text labels, one for each level.

With v2.9.9, the properties are properly set and updated as I advance in the Turn Tracker sequence.

In v3.0.x, properties for levels 3, 4 & 5 are not properly set in that only the last Level 3 (Fortnights / Time_MonthPhase property), the last Level 4 (Player turns / Time_MonthSubPhase property) and the last level 5 (Turn Phases / Time_TurnPhase property) get displayed. I can set the Turn tracker to whatever I want, if the sequence is outside of the last 3 lists given above, the piece onboard does not update its text labels as if the Global Properties were not properly updated.

Maybe it has to do with the way I defined the sequence with several level3, 4 and 5 using the same property names. But I cannot do otherwise as I don’t want to use different names. I need those properties in many triggers and I have to use somewhat generic names.

In v2.9.9 it was much ‘simpler’ (maybe not that simple as it was a bit bugged…) as you had to name your turn tracker (eg: “Time”) then you had you could use in the whole module properties like “Time_namex” to get the name of the current levelx list being used (this way I only had to test Time_name3 to check wether it was Production phase or not and Time_value3 to determine wether it was Replacements or Reinforcement Production subphase).

Since in v3.0.x we don’t have anylonger access to such XXX_name# and XXX_value# properties I had to resort to additionnal lists with only 1 items to be able to test conditions as described above (Production/Reinforcements or Production/Replacements).

It’s true that the new turn tracker in included in Vassal and not bugged as 1.8 was but what a step backward in terms of property access :slight_smile:

I know that $level1$, …, $levelx$ can still be used in the display format field of a turn tracker, but outside of the turn tracker those properties are not available. And even if they were, since those properties are not anylonger prefixed with the name of the turn tracker what would happen if a (looney?) designer tries to use 2 or more Turn trackers ?

Vassal developpers : any idea if this property issue is a bug or a “by design” behavior ?
Module designers : how would you do it using the current TurnTracker and it’s current behavior ?

Any help is more than welcome as I don’t want to design my whole module in 2.9.9 now that I’m addicted to the niceties of 3.0.x (and even more so since I started to test the working builds of JUckelman…)

I created a new entry in Bugtracker for this one (1895551)

Hi Aradiel,

These URL’s are not accessible. Are they local to your network?

Regards,
Brent.


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

Post generated using Mail2Forum (mail2forum.com)

Sorry Brent, it seems you accessed my post before I had time to edit it to correct my error :slight_smile:.

The correct URLs start with aradiel.free.fr/vassal/

Yours,

Hi David,

I have started having a look at your issues. Anything you might find also would be much appreciated. The Turn Tracker was heavily rewritten by Rodney when he merged it onto v3.0, so I am struggling to debug it as much as you :slight_smile:

I have fixed this by replacing my custom JLabel pretend buttons with real buttons and this now works as expected.

Yes, this is most probably causing problems. The way the exposing of the properties is implemented under Vassal 3.0 is very different using the MutableProperty interface. This may well be preventing the setting of the properties.

Investigation continuing.

Regards,
Brent.


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

Post generated using Mail2Forum (mail2forum.com)

I was ‘forced’ to use multiples level 3, 4 & 5 TurnList components because each level3 components are not containing the same supbcomponents. So I can not use simply nested level1,2,3,4,5 components.

I tried this : I changed the order of some lvl3 TurnList components and then my disply unit onboard would then disply the properties set by the last lvl3 TurnList component. So it definitely has to do with the order the components.

Thanks for your help.

In the mean time I will try to understand how TurnTracker code works :confused:

I was able to fix this so that different TurnLevel components can ‘share’ the same property name. I’m hoping this will fix a lot of your problems.

I have also added a ‘Maximum’ option to the turntracker width display to fix the width at a suitable level to see every combination. This will be the default setting for new Turntrackers. Existing turnTrackers will continue with the Variable setting until it is changed in the module.

I have also changed the way the turn display works so that higher-level $leveln$ variables from higher, unused levels are replace with blanks instead of being unchanged, so you should be able to get rid of this dummy lists as well.

Joel - this has been committed to swampwallaby-merge@3121 and 3122

Regards,
Brent.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Merged at 3123.

Do you think that IconButton is generally usefull enough to break it
out of where it was?


J.


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

Post generated using Mail2Forum (mail2forum.com)

I’m downloading Joel 3125 Windows build to test it right now…

LOVELY !!!
Thanks a lot
Vielen Dank
Muchas gracias
Merci beaucoup
:smiley:

Working as advised.
You guys are simply great.

By the way, I created a bug report in Sourceforge and I see that it’s still still with “nobody” working on it.

Who ca close this case as it has been solved?

Thus spake “Aradiel”:

I’ve closed the bug for you. Thanks for reporting it.


J.


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

Post generated using Mail2Forum (mail2forum.com)

So, what is the procedure for removing the Turn Tracker from a module made for 2.x and using the one from 3.x ?

  • Edit module using 2.x
  • Record turntracker details
  • Delete turntracker
  • Save Module
  • Edit module using 3.x
  • Add tunrtracker using ‘Add Turn Counter’ right-click on module component
  • Save Module

Regards,
Brent.


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

Post generated using Mail2Forum (mail2forum.com)