Author Topic: <round offset="+1"> stopped working  (Read 1586 times)

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
<round offset="+1"> stopped working
« on: January 18, 2012, 04:12:07 AM »
<round offset="+1"> seems to have stopped working for me, it doesent matter what offset value i set, it still shows current round number.

FlatFootWorks

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #1 on: January 18, 2012, 06:05:39 PM »
I am having the same issue.  Anyone know how to correct this problem?

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #2 on: January 18, 2012, 06:54:53 PM »

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #3 on: January 19, 2012, 08:03:41 AM »
The strange thing is that when i first started building my new layout at first the <round offset="1"> worked and showed "2" on round 1, then after a while when going throu rounds it started to show the current round number. I then tried to change the offset number to 2, but nothing happens. Now no matter what offset number i enter it will still show the current round value.


My new layout (inspired of Adz layout from this tread http://www.thetournamentdirector.net/forums/index.php?topic=3107.msg14574#msg14574

Only 2 things that not working as i would like.

1. (red dot #1) The number for next round shows current round.
2. (red dot #2) In this tournamen ive loaded 6 players witch in my AutoPrizes.xml gives me 2 prizes, and the 3:rd price should in my opinion be blank.


Click for larger image http://www.mcfrojd.com/bilder/td_layout_main.jpg
( text is in swedish on the layout )
« Last Edit: January 19, 2012, 08:07:09 AM by mcfrojd »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5428
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #4 on: January 19, 2012, 10:37:35 AM »
Ha, I just figured this out.  This occurs due to caching.

The reason this is occurring is that you have two places using the <round> token.  The first one displays the current round, the second displays the next round.  The tokens all cache their values to speed up processing.  The first one caches its value ("1", for example).  When the second instance (with the offset) is evaluated, it skips actual evaluation because it finds a "valid" value in the cache.  What should happen is each instance of the <round> token should cache its own values, based on its attributes.  Most tokens do this.  Looks like I forgot to change the caching when I added the offset attribute. Easy fix.

Try removing the first <round> token from your layout and you'll see the one with the offset suddenly start working.

mcfrojd

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #5 on: January 19, 2012, 11:07:46 AM »
Try removing the first <round> token from your layout and you'll see the one with the offset suddenly start working.

I've fixed the issue by adding a property set for each round (phew) for now.
Looking forward to se an patch fixing this in near future.

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #6 on: January 20, 2012, 12:54:44 AM »
Ha, I just figured this out.  This occurs due to caching.

The reason this is occurring is that you have two places using the <round> token.
This accurately describes the differences in the layouts which are and are not affected on my machine.

Quote
Try removing the first <round> token from your layout and you'll see the one with the offset suddenly start working.
I won't be able to play with this until after the weekend, but if there's value in me doing so, I'll do my part to corroborate your finding.  Nice sleuthing work in (apparently) figuring this one out!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5428
    • View Profile
Re: <round offset="+1"> stopped working
« Reply #7 on: January 20, 2012, 10:19:34 AM »
I definitely got it.  In addition, these tokens would have suffered the same problem:

nextGameType, nextGameName, nextSmallBlind, nextBigBlind, nextLimit1, nextLimit2, nextAnte, rebuyInfo, addonInfo, bountyTotal, actionSummary

I fixed all of these for 3.1.