Author Topic: Two layout token questions  (Read 1802 times)

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Two layout token questions
« on: November 06, 2011, 09:22:47 AM »
V3

1. I'm trying to add a token that displays the next round number.  I'm using
Code: [Select]
<round offset="+1"> as the contents of my token.  The resultant output display is the current round.  Using +2 or other numbers does not change this behavior.  Not using the + sign does not change this behavior.  Not using the quotes doesn't change this behavior.  Using a - sign does not change this behavior.  I only have two Property Sets: After Tournament (the only modified Condition behing "Stage: After game"), and Default (which is the one I can't get to work appropriately).  Advice?

2. I would like to display the duration of my next round in MM:SS format.  The default output of the <duration> tag is in HH:MM format.  Using the Contents of this token as
Code: [Select]
<duration round="+1" format="clock" alwaysShowHours="false"> does not accomplish what I'm after.  I'd be comfortable with a workaround that only displayed the minutes of the next level (after which I could manually add the text ":00" to accurately represent the seconds).  Unfortunately I have a frequently used structure that changes the minutes on a round-by-round basis, so I cannot hard code the minute text into my general layout.   Enabling the alwaysShowHours tag for the <duration> token would be a great fix. :)

Thanks for your help on both these issues.

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Two layout token questions
« Reply #1 on: November 06, 2011, 09:31:49 AM »
Possibly shining a bit more light on Issue #1:

If I change the token from <round> to the (seemingly redundant) <level> token, I always get my current round - 1 displayed (i.e., if the tournament is in the sixth level, the <round offset="{anything"}"> token displays as  6, and the <level> token displays as 5 (as does the <level offset="{anything}">, though it would appear that the <level> token does not take any parameters).

I can provide my layout files if they would help, though I'd have to have my hand held in doing so.  (And I've also managed to install a custom font as well, and would have no idea how to share that without some assistance.)

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Two layout token questions
« Reply #2 on: November 07, 2011, 03:46:05 PM »
My workaround for both issues is gross, but lacking any assistance here and with a time-sensitive issue, I went forward with the workaround:
In each "Next Round" cell  I generated a separate Property Set for every round of the tournament, then filled in the Content text manually with Round+1 for each Condition.  Also, I created separate layouts for my tournaments with changing blind durations and then used the same separate Property Set for each segment of the tournament with appropriate durations (hard coded times to look as if in MM:SS format).

I'm still interested in what may have been going on with the offset property tag.  I verified that I had not created any hard-coded "round" or "level" tokens (though I could get the raw values to change if I did create numeric text entries for those manual tags, the offset="+1" property tag never did function as intended). 

Strange things afoot...

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5379
    • View Profile
Re: Two layout token questions
« Reply #3 on: November 07, 2011, 11:52:24 PM »
Think of your schedule as a collection of Rounds and Breaks.  A Level is either a Round or a Break, and the list of levels (the Schedule) begins numbering at 0.  Rounds and breaks start numbering at 1, but the collection of levels begins numbering at 0.  Honestly, I'm not sure why (any more)  the levels would start numbering at 0 other than programming conventions, but that's the way it is.

Level   Type
    0   Round 1
    1   Round 2
    2   Round 3
    3   Break 1
    4   Round 4
    5   Round 5
    6   Round 6
    7   Break 2
    8   Round 7
    9   Round 8
   10   Round 9


The offset attribute of the <round> token does work.  I think probably a different property set was being displayed, and that's why you didn't see any change with different values.  I'm not certain I'm right about that, but that's what I think.  I did just test this and it works fine for me.

Try as I might, I can't find a way to workaround the issue with the <duration> token.  I'll have to add a to-do item...

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Two layout token questions
« Reply #4 on: November 08, 2011, 12:18:52 AM »
Thanks for the level vs. round explanation.  I had noodled that into my head as well, but it's nice to have it confirmed.

As for the offset attribute not working, I can't explain it.  I loaded in the default layout and added the offset attribute with success, but when using my heavily modified layout it's completely ineffective.  I didn't do anything wild and/or crazy with self-generated tokens or anything I thought would be out-of-the-norm.  Odd behavior.

Glad that my work-around was going to end up being necessary in the end anyway.  Would have been a bit of a shame if you'd have posted an 8 character text code that'd fixed all my troubles.  Hope you had a nice vacation...

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Two layout token questions
« Reply #5 on: November 08, 2011, 11:37:18 AM »
As for the offset attribute not working, I can't explain it.  I loaded in the default layout and added the offset attribute with success, but when using my heavily modified layout it's completely ineffective.  I didn't do anything wild and/or crazy with self-generated tokens or anything I thought would be out-of-the-norm.  Odd behavior.
This is totally false!  With any of my tournaments (I have a handfull of empty "shell tournaments" of various sorts, set up with my rebuy/add-on/rounds/etc. preloaded, but without any player information or prizes set) the offset property is not working no matter which layout file I apply.  I opened one of my shell tournaments and had the software suggest new rounds to see if that would affect things, but it did not change the offset tag behavior.

I then created a new tournament from scratch, loading only my chipset template, my modified prize distribution file, and using players already in my database.  I had the software suggest rounds again.  The behavior repeated: the offset tag did not work in any layout.

I'd be happy to provide any files which would be useful to track this down (though you'd have to use small words to ensure I didn't screw anything up).

[edit to add:]
Possibly unrelated, but when I go to open one of my empty generic setups, I get this error:
Code: [Select]
'undefined' is null or not an object (GameTab, TournamentPage: 1069)
 at TournamentPage.displayCell(String, Boolean, GameState, Map)
 at TournamentPage.update(Boolean)
 at TournamentPage.notifListener(Array)
 at NotifServer.send(Array)
 at Dashboard.scrollIn()
 at Dashboard.checkDashboardStatus()
 at Dashboard.notifListener(Array)
 at NotifSubscriber.notifListener(Array)

Browser: Microsoft Internet Explorer
Browser Beta: false
Browser Client Info Version: 7.0
Browser Code Name: Mozilla
Browser Decided Version: 8.0
Browser Detected Version: 8.0
Browser Language: en-us
Browser Minor Version: 0
Browser Version: 4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; BRI/2)
Cookies Enabled: true
CPU Class: x86
Data Folder: C:\Documents and Settings\Neal\My Documents\The Tournament Director 2
Date: 1:53:44 pm 11/08/2011
DB File: C:\Documents and Settings\Neal\My Documents\The Tournament Director 2\Data\db\td.db
DB Folder: C:\Documents and Settings\Neal\My Documents\The Tournament Director 2\Data\db
Install Folder: C:\Program Files\The Tournament Director 3
Install Info: b1debf33773b8a1667a5263e28fa9475
JScript Build: 23141
JScript Version: 5.8
License Info: iGSz81BHmRxtpTpcBSnsOZuhR3WmzsJoJapnceewbEPdxqF+6QhMNT4+hxiWnR7h
Media Player Version: 11.0.5721.5280
Online: true
Platform: Win32
Preferences File: C:\Documents and Settings\Neal\My Documents\The Tournament Director 2\prefs.sav
Repo Config File: C:\Documents and Settings\Neal\My Documents\The Tournament Director 2\repo.sav
Repo Folder: C:\Documents and Settings\Neal\My Documents\The Tournament Director 2\Data
System Language: en-us
TD Patch Level: 1
TD Version: 3.0
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; BRI/2)
User Language: en-us
« Last Edit: November 08, 2011, 02:56:12 PM by The Meal »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5379
    • View Profile
Re: Two layout token questions
« Reply #6 on: November 09, 2011, 10:25:48 AM »
I don't know what to tell you at this point.  I tried it several times, it works for me.  But why don't you send me one of your saved tournaments (hopefully with the layout saved with it) where you have the <round> token with the offset attribute that isn't working for you and let me see what I see.  Might be a subtlety that isn't being conveyed in our posts.

As for the error: I've gotten this error report from probably a dozen or so people, but I am unable to reproduce it.  If you have a specific tournament file where you see this error, please send it to me.  support@thetournamentdirector.net

Mac_09

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Two layout token questions
« Reply #7 on: December 29, 2011, 04:26:36 PM »
Was there ever a resolution on this?  The <round offset="+1"> token is not working for me either.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5379
    • View Profile
Re: Two layout token questions
« Reply #8 on: January 02, 2012, 07:43:55 PM »
Was there ever a resolution on this?  The <round offset="+1"> token is not working for me either.

The error reported in The Meal's last reply was resolved in a patch that everyone's version 3 TD should have automatically downloaded and applied.

For the life of me I cannot remember if he sent me a tournament file to check out, or if he said the problem went away, or if nothing beyond what you've read has happened.  Looking at code, I don't see any changes I've made in response to this.

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Two layout token questions
« Reply #9 on: January 02, 2012, 09:16:32 PM »
We troubleshat (heh) the issue via emails on 11/9 and 11/10.  At one point the software was working as advertised though in the interim it has gone back to the behavior listed at the top of this thread. :(  Since I had already coded in my workaround (manually creating Property Sets for each and every level), I wasn't motivated to help track down an intermittent issue.

If I can be of help, I'm totally willing.  But I'm not volunteering to drive the buggy.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5379
    • View Profile
Re: Two layout token questions
« Reply #10 on: January 03, 2012, 10:30:23 AM »
I honestly thought we had, but I searched and couldn't find an email thread between us so I figured I imagined it.  :)