Mr. Lucky
Android Expert
Anyone that uses the Zooper Pro widget engine knows that it's a great and flexible tool. Recently though I discovered a problem with the weather forecast portion that destroyed my layout (issue probably exists with the free version of Zooper also).
Here's the scenario:
I had three days' forecast arranged side by side, with enough space between to allow for the longest possible weather result (as per the Zooper spec at http://www.zooper.org/wp/archives/1155). The problem is, the weather forecast for day 3 was not compliant with the spec - I had a forecast of "Scattered Thunderstorms," which is 23 characters, whereas the longest possible result per the spec should be 13 characters (condition codes 2, 13, and 14). The result was predictable - the left side of the text overlapped the day 2 forecast, and the right side truncated off the edge of the widget! The problem seems to be that Zooper is accepting this result as a valid condition code 2, simply because it contains "Thunderstorm" in the text.
Here is the "solution":
AFAIK, it's currently possible to receive "Thunderstorm" (13 characters), "Thunderstorms" (14 characters), or "Scattered Thunderstorms" (23 characters). The code I provided causes any condition code 2 to be translated to "Thunderstorm" as per the spec, and makes no change otherwise.
This info has been provided to Zooper. Hopefully they will fix it in the next revision (or update the spec).
(Edited because I can't spell before having my morning coffee.)
Here's the scenario:
I had three days' forecast arranged side by side, with enough space between to allow for the longest possible weather result (as per the Zooper spec at http://www.zooper.org/wp/archives/1155). The problem is, the weather forecast for day 3 was not compliant with the spec - I had a forecast of "Scattered Thunderstorms," which is 23 characters, whereas the longest possible result per the spec should be 13 characters (condition codes 2, 13, and 14). The result was predictable - the left side of the text overlapped the day 2 forecast, and the right side truncated off the edge of the widget! The problem seems to be that Zooper is accepting this result as a valid condition code 2, simply because it contains "Thunderstorm" in the text.
Here is the "solution":
In the Text module for each forecast day,
replace #WxCOND# with:
$#WxCODE#=2?Thunderstorm:#WxCOND#$
where "x" = the forecast day (e.g., 0 for current day, 1 for tomorrow… )replace #WxCOND# with:
$#WxCODE#=2?Thunderstorm:#WxCOND#$
AFAIK, it's currently possible to receive "Thunderstorm" (13 characters), "Thunderstorms" (14 characters), or "Scattered Thunderstorms" (23 characters). The code I provided causes any condition code 2 to be translated to "Thunderstorm" as per the spec, and makes no change otherwise.
This info has been provided to Zooper. Hopefully they will fix it in the next revision (or update the spec).
(Edited because I can't spell before having my morning coffee.)
Last edited: