|
|
|
More convenient test case
<canvas width="100%" height="80%" debug="true"> <debug fontsize="12"/> <!-- use new "datafromchild" attribute to let me define method in dataset :-) --> <dataset request="true" datafromchild="true" name="ds" src="http:nosuchfile.xml" onerror="this.doerr()"> <method name="doerr" args="xd"> Debug.write('doerror ', xd); if (xd == null) { Debug.write("test passed, null value returned"); } else { Debug.error("test failed, null value not returned"); } </method> </dataset> </canvas> r6377 | hqm | 2007-09-05 21:25:04 -0400 (Wed, 05 Sep 2007) | 40 lines
Changed paths: M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs Change 20070905-hqm-6 by hqm@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: 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 Called by: http://localhost:8080/lps-4.1.x/my-apps/LPP-4660.lzx?lzproxied=false for SOLO deployment.
The variable xd contains 'null', as expected. Tested in SOLO deployment. The following is returned in the debug window:
WARNING: LzLoadQueue.XMLOnDataHandler load failed from URL 'nosuchfile.xml?__lzbc__=1193177539578', no data received. WARNING: Failure to load data in serverless apps may be caused by Flash player security policies. Check your data server crossdomain.xml file doerror undefined test passed, null value returned Tested on Firefox 2.0.0.8 and IE7, Windows; Firefox 2.0.0.8 and Safari 2.0.4 Macintosh. Verified. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<canvas width="100%" height="80%" debug="true">
<debug fontsize="12"/>
<dataset name="ds" src="http:nosuchfile.xml" onerror="canvas.doerr()"/>
<method name="doerr" args="xd">
Debug.write('doerror ', xd);
</method>
</canvas>
Should return null as value of xd arg, not an instance of Lzloader