2013-09-12, 18:18
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,
and so on.
In the weather script (default.py) I build make calls to setProperty eg
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...
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>
...
<texture>$INFO[ListItem.ActualIcon]</texture>
...
<label>$INFO[ListItem.Property(HighTemp)]</label>
...
<visible>!IsEmpty(ListItem.Property(HighTemp))</visible>
and so on.
In the weather script (default.py) I build make calls to setProperty eg
Code:
WEATHER_WINDOW.setProperty("Day0.Title", "Monday")
WEATHER_WINDOW.setProperty("Day1.Title", "Tuesday")
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...