Problem with "Integer.*" bools
#1
I have a widget container id 510 with static widget content.  One property on the content is the video rating that I get from service.skin.widgets.  It is formatted as "n.n"  I can display the label with no problem.  But when I test it with any test such as
Code:
Integer.IsGreater(container(510).listitem.property(videorating),0)
for example, it's always false.  Looking at the code in GUIInfoManager it seems like the string is first checked to see if it is an "nn:nn" time string and if not atoi(some_string) is called and the result tested against the supplied value.  IIUC, if for example the property value is stored as "6.7"  atoi("6.7") should return 6 as an integer and so Integer.IsGreater(this_property,0) should return true?  But I can't figure out a way to test this without running Kodi in a debugger.  I did mod the script so it returned a string that was an integer and that works, but I guess the only way to get it to work using n.n is to use String.StartsWith (works here since it only runs 0-10) but that seems sort of inelegant.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix
Leia see: 304472
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Problem with "Integer.*" bools00
This forum uses Lukasz Tkacz MyBB addons.