I don't understand ListItem - 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: I don't understand ListItem (/showthread.php?tid=173340) |
I don't understand ListItem - powlo - 2013-09-12 Hi, I'm trying to reskin my weather. In the MyWeather.xml I see the list of forecast intervals (days, hours etc) is built up using a generic ListItem. Eg, Code: <label>$INFO[ListItem.Label]</label> and so on. In the weather script (default.py) I build make calls to setProperty eg Code: WEATHER_WINDOW.setProperty("Day0.Title", "Monday") So what's the link between ListItem and the properties I'm setting in the script? How does it know that DayX is a list and that X can range from 0 to 6? How does it know to split the string of the property I set, so the part after the period becomes a fetchable property in the skin for each list entry? OK reading further it seems to be done with the <content> and <item> tags... RE: I don't understand ListItem - spiff - 2013-09-12 listitem points to .. items in a list. in this case, the list of days. from the script we transfer all the properties, then these are copied to properties for the items in the list in the code. RE: I don't understand ListItem - powlo - 2013-09-12 yep I added a comment to my original post. The actual transfer of values is done with <content> and <item> elements. Eg: Code: <content> |