Author: hqm
Date: 2007-09-06 09:20:48 -0700 (Thu, 06 Sep 2007)
New Revision: 6383
Modified:
openlaszlo/branches/wafflecone/demos/weather/weather.lzx
Log:
Change 20070906-hqm-8 by [EMAIL PROTECTED] on 2007-09-06 12:18:52 EDT
in /cygdrive/c/users/hqm/openlaszlo/wafflecone3/demos/weather
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/demos/weather
Summary: fix weather error reporting
New Features:
Bugs Fixed: LPP-4521
Technical Reviewer: frisco (pending)
QA Reviewer: mamye (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
look for Error in the return messag,e and parse out error message
Tests:
weather app, use bogus zipcode
Modified: openlaszlo/branches/wafflecone/demos/weather/weather.lzx
===================================================================
--- openlaszlo/branches/wafflecone/demos/weather/weather.lzx 2007-09-06
12:52:11 UTC (rev 6382)
+++ openlaszlo/branches/wafflecone/demos/weather/weather.lzx 2007-09-06
16:20:48 UTC (rev 6383)
@@ -8,7 +8,8 @@
<!-- is subject to license terms. -->
<!--=======================================================================-->
-<canvas width="240" height="320" bgcolor="#EAEAEA" title="Laszlo Weather">
+<!-- <canvas width="240" height="320" bgcolor="#EAEAEA" title="Laszlo
Weather"> -->
+<canvas bgcolor="#EAEAEA" title="Laszlo Weather">
<!-- the actual size of the app is: width="240" height="320"
this app is sized larger to appear consistent with other samples -->
<splash/>
@@ -294,12 +295,12 @@
<datapointer xpath="weatherdata:/*" ondata="processData();"
onerror="showError();"
ontimeout="showTimeout();">
-
<!-- When data is received from the datasource, do this -->
<method name="processData">
- if ( this.getNodeName() == "error" ) {
+ var title = this.xpathQuery("/rss/channel/title/text()");
+ if ( title.indexOf( "Error" ) != -1 ) {
error.setText("Error: " +
- this.getNodeAttribute( 'message' ) );
+ this.xpathQuery(
'/rss/channel/item/title/text()' ) );
zipBtn.animate('x',0,333,false);
return;
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins