Author Topic: Add new Property Set to all Tokens on a Screen?  (Read 1386 times)

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Add new Property Set to all Tokens on a Screen?
« on: November 02, 2013, 12:12:57 PM »
This may not be something folks are clamoring for, but from my (ignorant!) perspective it seems like it may be a simple coding addition, and would have saved me hours this morning.  (I.e., if I were in full control, I'd have coded my tool to do this job rather than brute force it the first time through.)

I would like the ability to add a new Property Set to all Tokens which appear in a Screen (or by Screen Set).  I'd be fine if this new Property Set copied all properties from each Token's default.  Finally, I'd like to set the Condition under which this new "global" Property Set applies.

In terms of an example, I'm converting a No Limit-only tournament layout to a tournament during which alternating rounds are played NL and Fixed Limit.  To keep my players sane, I'm using a radically different color scheme for each Game Type.  After creating new Global Properties for each element with my new color scheme, I had to go into each token on the Screen and add a "FL" Property Set with the Condition that Game Type is Limit.  I'd then copy the token's default formatting and manually select from my list of newly created Global Properties which one I wanted.  This last step would take a significant amount of coding and I wouldn't request that portion be automated, but the initial steps involve a lot of repetitive mouse clicks which seem easily automated (says the guy who would not be doing any of the coding).

This sort of thing would come up any time someone would want to drop in a new global condition on their tournament displays (such as different Screens for alternating rounds).  If there's any thought to adding to the list of potential Game Types, then this sort of thing seems very like to crop up for other folks in the future.

Thank you for your consideration Corey.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Add new Property Set to all Tokens on a Screen?
« Reply #1 on: November 04, 2013, 04:51:10 PM »
This took me a while to digest, until I figured out you are referring to Cells when you said Tokens.  OK, I think I get this.  And I'm all for adding little features that make stuff like this easier (and less time consuming).  The layout can be very tedious, I certainly understand that.  But I don't always think of ways to improve it because I don't really do a lot of layout design.

Basically you had to add a new Property Set to all of the Cells that were displayed in your layout.  The Property Sets were essentially the same: use these [same] Conditions so the Property Set is displayed at the appropriate time, and use this Global Property Set to define how the cell looks.

So you had to edit a Cell, add a new Property Set, set the Property Set's Conditions, set the Property Set to use a particular Global Property Set, set the Property Set's Contents, and finally move the Property Set to the appropriate position (order within the other Property Sets).  Repeat for every Cell (10 or 20 times, I would presume).  That, most definitely, is tedious.

One difficulty is that the Cell's Contents will be different, and another is that the Property Group might be in a slightly different order for each Cell (but likely similar if not the same).  Regardless, just getting the new Property Set to every Cell would be a big win.  I wonder if it would be enough to add a "Copy Multiple" button on the Cell dialog that allowed you to pick all of the Cells to which you would like to copy the current Property Set.  There could be a shortcut for selecting all of the cells on the current screen (for example).

Let me know if I got that right.  I'll have to explore it a little bit to see if it's feasible.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Add new Property Set to all Tokens on a Screen?
« Reply #2 on: November 06, 2013, 10:07:02 AM »
FYI, I hope I got this right, because I added it for 3.3.

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Add new Property Set to all Tokens on a Screen?
« Reply #3 on: November 07, 2013, 08:38:30 PM »
This took me a while to digest, until I figured out you are referring to Cells when you said Tokens.
Ack!  You, of course are correct.  I tried to be precise with my language, too. :(

Quote
I don't always think of ways to improve it because I don't really do a lot of layout design.
Totally understand.  I'm the same way with tools I support in my day job.  Rare that developers have the same experiences as end-users.

Quote
Basically you had to add a new Property Set to all of the Cells that were displayed in your layout.  The Property Sets were essentially the same: use these [same] Conditions so the Property Set is displayed at the appropriate time, and use this Global Property Set to define how the cell looks.
Add a new Property Set to all Cells on a layout display, each firing under the same Condition.  I actually had different a large number of Global Properties of formatting to apply to these new Property Sets, but there's nothing wrong with having the option to apply a specific Global Property to all.  It would also have been fine if it had just copied the Global Property which had been used in the Cell's default Property Set.

Quote
So you had to edit a Cell, add a new Property Set, set the Property Set's Conditions, set the Property Set to use a particular Global Property Set, set the Property Set's Contents, and finally move the Property Set to the appropriate position (order within the other Property Sets).  Repeat for every Cell (10 or 20 times, I would presume).  That, most definitely, is tedious.
My display has about 50 Cells, with roughly a dozen different Global Properties spread amongst them.  I spent two hours to get half way done, lost all work due to a TD3 crash without save (ran out of memory), then spent about 60 minutes to recreate what had been done and to apply my changes to the remaining Cells.  I also have two Screens within my Screen Set which upped the total number of Cells.  (I also have an iframe which accesses a web page on my local server which uses Brandon Fuller's "Now Playing" script which generates a XML file containing data of the song currently playing in iTunes, which then generates an HTML page through PHP -- which required some changes to match the formatting.)

Quote
One difficulty is that the Cell's Contents will be different, and another is that the Property Group might be in a slightly different order for each Cell (but likely similar if not the same).  Regardless, just getting the new Property Set to every Cell would be a big win.  I wonder if it would be enough to add a "Copy Multiple" button on the Cell dialog that allowed you to pick all of the Cells to which you would like to copy the current Property Set.  There could be a shortcut for selecting all of the cells on the current screen (for example).
That's a great implementation idea.  Make it a toggle to just copy the default Global Property for each cell.  Put the new Property Set at the top of the stack (as it's likely to fire under the most restrictive conditions of any of the Property Sets within the Cell.

Quote
Let me know if I got that right.  I'll have to explore it a little bit to see if it's feasible.
Boy, I sure hope you can implement something like this in 3.3, that'd be fantastic and I'd be tempted to say (again), "You're the best, Corey." 8)

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Add new Property Set to all Tokens on a Screen?
« Reply #4 on: November 09, 2013, 02:36:11 PM »
What I did was add a "Clone" button to the Cell Properties dialog.  It opens a dialog allowing you to select all of the cells to which you wish to clone the current property set (see the attached pic).  You give it a name and select the cells.  Cells in red italic already have a property set with the given name, so you either can't clone the property set to that cell or you have to change the name.  Press OK and the current property set is cloned and added to each of the selected cells.  I'm not sure if that's exactly what you were looking for, but I think it's still a useful feature.