Agreed. My calendar skin uses Lua because it makes certain things so much easier.Sure thing, no problem - I do the same, only resort to Lua when there's no other choice or the cost - benefit ratio is obviously indicating a Lua approach.![]()
You're so right, my descriptive powers leave much to be desired.However, since it doesn't hurt to try or just to understand the idea, I'd still be curious about what outcome you'd expect from:
I assume you'd use the inline function in the meters, so what returned values would you expect from using it in [mtrDaily1DayIcon] and [mtrDaily1NightIcon] through [mtrDaily7DayIcon] and [mtrDaily6NightIcon]? Your visual description might make sense for you, but I have some trouble following it, since I (and probably others too) don't know how the skin looks like and most importantly what values those meters should use:and if they differ from row to row, or depending on whether measures start with day or night in the XML and similar.Code:
mtrDaily1DayIcon -> ?mtrDaily1NightIcon -> ?...mtrDaily7DayIcon -> ?mtrDaily6NightIcon -> ?

If you look here for an example: https://weather.gc.ca/en/location/index.html?coords=49.245,-123.115 and scroll down to the forecast section, you'll see that the forecast during the day (just concerned with the graphic part for now) is arranged as two rows of seven cells each, with the top row being consecutive days and the bottom row being the corresponding nights, so it consists of seven days and six nights, with the seventh night always remaining empty. If you look at the same page during the night, the top left cell, representing 'Today', will be empty, because the day is already passed.
So in my model so far, I am displaying that graphic arrangement vertically, rather than horizontally (think of a tall, more narrow skin), so there are seven horizontal rows, each composed of a day icon on the left, and a night icon on the right, with the last cell again remaining empty. Code wise, this consists of 13 meters, a day and a night, a day and a night, and so on (no 14th meter, since that last cell is empty). Each meter is coded to the corresponding measure, eg. Period1, Period2, etc.
In the XML being parsed, the <forecastGroup> section consists of 13 <forecast></forecast> sections, corresponding to the measures Period1, Period2, etc. So the first <forecast></forecast> section, corresponding to Period1, is the first day in the skin, the second is the first night, the third is the second day, the fourth the second night, and so forth.
BUT... and here is the rub, during the night, there are only 12 <forecast></forecast> sections, with the first being the first night ('Tonight'), the second being the second day, the third being the second night, etc.; and yet they are still the Period1, Period2, etc. measures. So, Period1 can be either 'Today' or 'Tonight', depending on whether the XML is parsed during the day or during the night, and likewise all of the other periods will be sometimes a day, and sometimes a night. So the result was that, during the night, the night icons were being displayed on the left side of each row, and the follow day's day icon on the right side of that row.
And this is the reason why I wished to have the names of the measures (in the meters) to begin either with Period1 (during the day) or with Period0 (a blank cell) during the night, so that the night icons always end up on the right, with the following day's day icon on the left of the next row. And this was achieved (thanks, jsmorley) by using bangs to set the values of 13 variables (used in the names of the measures within the meters) as a series beginning with 1, or with 0, depending on whether it is day or night. Also, I should point out that this group of 13 meters (the icons) will be followed by other groups of 13 meters, showing the condition, the temperature, and so on, and each group will be affected in the same way by those same 13 variables.
But now I am curious as to what you had in mind when you referred to the inline functions of the meters?
Statistics: Posted by qwerky — Yesterday, 8:30 pm