[Laszlo-checkins] r6377 - in openlaszlo/branches/wafflecone/WEB-INF/lps/lfc: data kernel/swf
hqm@openlaszlo.org
hqm at openlaszlo.org
Wed Sep 5 18:25:07 PDT 2007
Author: hqm
Date: 2007-09-05 18:25:04 -0700 (Wed, 05 Sep 2007)
New Revision: 6377
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
Log:
Change 20070905-hqm-6 by hqm at IBM-2E06404CB67 on 2007-09-05 20:33:42 EDT
in /cygdrive/c/users/hqm/openlaszlo/wafflecone3/WEB-INF/lps/lfc
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/WEB-INF/lps/lfc
Summary: fix for return value of onerror event in data loading
New Features:
Bugs Fixed: LPP-4660
Technical Reviewer: pkang (pending)
QA Reviewer: andre (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
When the XML SOLO data loader in LzLoadQeueue got no data, it was returning the LzLoader as a return value
in an onerror event. This was confusing, so this changes the return value to null.
There was also some broken code which was supposed to set the status value of the data request, but
was referencing class static variables for the constants in a way that didn't work, and thus getting
undefined values. Not sure how this ever worked.
Tests:
see bug report
also
test/lfc/data
lzpix (SOLO)
amazon (SOLO) http://127.0.0.1:8080/wafflecone3/demos/amazon/amazon.lzx?lzproxied=false
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2007-09-06 01:18:44 UTC (rev 6376)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2007-09-06 01:25:04 UTC (rev 6377)
@@ -188,7 +188,7 @@
function loadSuccess ( loader, data ) {
var dreq = loader.dataRequest;
- dreq.status = "success";
+ dreq.status = LzDataRequest.SUCCESS;
loader.owner.loadResponse( dreq, data );
}
@@ -200,13 +200,13 @@
function loadTimeout( loader, data ) {
var dreq = loader.dataRequest;
- dreq.status = "timeout";
+ dreq.status = LzDataRequest.TIMEOUT;
loader.owner.loadResponse( dreq, data );
}
function setRequestError (dreq, msg) {
dreq.error = msg;
- dreq.status = dreq.ERROR;
+ dreq.status = LzDataRequest.ERROR;
}
/**
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as 2007-09-06 01:18:44 UTC (rev 6376)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as 2007-09-06 01:25:04 UTC (rev 6377)
@@ -97,7 +97,10 @@
Debug.warn("LzLoadQueue.XMLOnDataHandler load failed from URL %w, no data received.", this.url);
Debug.warn("Failure to load data in serverless apps may be caused by Flash player security policies. Check your data server crossdomain.xml file");
this.onload(false);
- if (this.loader.onerror.ready) this.loader.onerror.sendEvent(this.loader);
+ //Debug.write("this.loader.onerror.ready =", this.loader.onerror.ready);
+ if (this.loader.onerror.ready) {
+ this.loader.onerror.sendEvent(null);
+ }
// cancel the timeout handler
LzLoadQueue.unloadRequest(this);
} else {
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs 2007-09-06 01:18:44 UTC (rev 6376)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs 2007-09-06 01:25:04 UTC (rev 6377)
@@ -201,7 +201,9 @@
if ( err != null ){
Debug.error( err );
- if (this.onerror.ready) this.onerror.sendEvent( data );
+ if (this.onerror.ready) {
+ this.onerror.sendEvent( err );
+ }
return;
}
More information about the Laszlo-checkins
mailing list