Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
2009-07-08, 13:33
(This post was last modified: 2009-07-08, 14:43 by spiff.)
uhm, that's a stringcompare!
currently, the only way to do it would be
<visible>[!stringcompare(NumItems,4) + !stringcompare(NumItems,3) + !stringcompare(NumItems,2) + !stringcompare(NumItems,1) + !stringcompare(NumItems,0)]</visible>
or thereabout
Posts: 768
Joined: Feb 2009
Reputation:
0
yup, it worked, but i need a "|" (or) and not a "+" (and)
but thanks anyway, i was on the right track just needed the correct syntax.
Andy.
Posts: 17,405
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,405
Could this be used to determine whether to use a fixedlist (when the number of items is less than or equal to the items on screen) or a wraplist (when the number of items is greater than the number of items on screen)?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
IMO We don't want to run a regex on a string every single frame.
Until we have pushed info setup, anything much more than we already have is slowing things down too much.
Assuming Container.NumItems is available, then surely you can determine whether there is 10 or fewer items on screen using "just" 11 compares? Note that general string compares aren't good for comparing numbers (though we do have a alphanumeric compare which could be used instead).
Cheers,
Jonathan
Posts: 459
Joined: Jan 2007
Reputation:
10
changed the name to integergreaterthan(infolabel,comparevalue)
- Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
- Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
- Bedroom - LG Laptop on a 32" tv
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
diff should apply to old as well if you want to play with it and builds yourself.