Kodi Community Forum
IntegerGreaterThan - how's it used? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: IntegerGreaterThan - how's it used? (/showthread.php?tid=60586)

Pages: 1 2


IntegerGreaterThan - how's it used? - Hitcher - 2009-10-31

I'm trying to use these two conditions

Code:
<visible>!stringcompare(IntegerGreaterThan(Container(50).NumItems,8))</visible>

and

Code:
<visible>stringcompare(IntegerGreaterThan(Container(50).NumItems,8))</visible>

but it always uses the first one no matter how many items there are.

Is this the correct way to use IntegerGreaterThan?


- phil65 - 2009-10-31

Hitcher Wrote:I'm trying to use these two conditions

Code:
<visible>!stringcompare(IntegerGreaterThan(Container(50).NumItems,8))</visible>

and

Code:
<visible>stringcompare(IntegerGreaterThan(Container(50).NumItems,8))</visible>

but it always uses the first one no matter how many items there are.

Is this the correct way to use IntegerGreaterThan?

Shouldn´t

Code:
<visible>IntegerGreaterThan(Container(50).NumItems,8)</visible>

and

Code:
<visible>!IntegerGreaterThan(Container(50).NumItems,8)</visible>

be sufficient? You also didn´t specify a second parameter for stringcompare.


- eumel - 2009-10-31

How temmy it says isgreaterthan are only true or false.
You need no stringcompare.


- Hitcher - 2009-10-31

temmi2000 Wrote:Shouldn´t

Code:
<visible>IntegerGreaterThan(Container(50).NumItems,8)</visible>

and

Code:
<visible>!IntegerGreaterThan(Container(50).NumItems,8)</visible>

be sufficient? You also didn´t specify a second parameter for stringcompare.
Doesn't even load the view type.

EDIT: It should be comparing Container(50).NumItems and 8.


- Hitcher - 2009-11-02

Well I'm not the only one who couldn't get it working so I'll post it on the Trac tomorrow as it appears to be broken.


- watzen - 2009-11-06

the proper usage would be the ones that temmi wrote. However those do not work and there are some differences in the code that I had in my latest patch and the code that JM added to the svn. I really don't understand what those changes does. All I can say is that it worked for me with the code that I posted... at that time... with that svn-version.
I haven't had time to do any testing if my original patch would work with the current svn.
I'm not sure it will work with what you are trying, but I've tested the function with simple things and it doesn't work with those either.

Maybe someone else can shed some light onto this? the addition refers to the ticket #7007.


- Hitcher - 2009-11-06

More info -

http://trac.xbmc.org/changeset/23198


- watzen - 2009-11-06

I think I found a problem...
else if (strTest.Left(18).Equals("integergreaterthan("))
should be
else if (strTest.Left(19).Equals("integergreaterthan("))
will try and report back...


- watzen - 2009-11-06

yup that and two other 18's had to be changed, posted a ticket on trac with a fix


- Hitcher - 2009-11-06

Cheers.

Just got to wait before I can test it.


- watzen - 2009-11-06

fixed in http://trac.xbmc.org/changeset/24318!


- watzen - 2009-11-06

Here's a build if you want to test it: Build


- Hitcher - 2009-11-06

watzen Wrote:Here's a build if you want to test it: Build

Thanks for that. Big Grin


- Hitcher - 2009-11-07

Tried adding both conditions to two view types and neither will show up.


- jmarshall - 2009-11-08

I suspect it's because the visibility condition is evaluated before items are passed in.