|
|
|
Multiple calls to setResource() and unload() only work the first time. Tested r6893 using IE7 and a dhtml compilation of the app.
STEPS: 1. compile script 2. click on resource button and unload button multiple times 3. click on source button and unload button multiple times RESULTS: Only first triggering of setresource() and unload() will have an effect. Subsequent triggerings of those calls will not display and clear a picture. Triggering setSource() and unload() multiple times throws no errors. EXPECTED: Triggering setResource() and then an unload() should work as many times as they are triggered. Author: max
Date: 2007-11-14 11:08:10 -0800 (Wed, 14 Nov 2007) New Revision: 7261 Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs Log: Change 20071114-maxcarlson-Q by maxcarlson@Roboto on 2007-11-14 10:00:18 PST in /Users/maxcarlson/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Allow resources to be reloaded after unload() New Features: Bugs Fixed: Technical Reviewer: promanik QA Reviewer: jcrowley Doc Reviewer: (pending) Documentation: Release Notes: Details: LzSprite.js - clear out .reloaded when unload() is called. LaszloView.lzs - clear out ._reloaded when unload() is called. Tests: See Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js =================================================================== --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-11-14 18:56:47 UTC (rev 7260) +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-11-14 19:08:10 UTC (rev 7261) @@ -1509,6 +1509,7 @@ } LzSprite.prototype.unload = function () { + this.resource = null; if (this.__ImgPool) { this.__ImgPool.destroy(); this.__ImgPool = null; Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs =================================================================== --- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2007-11-14 18:56:47 UTC (rev 7260) +++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2007-11-14 19:08:10 UTC (rev 7261) @@ -2288,6 +2288,7 @@ * Unloads media loaded with setSource or the source= attribute. * */ function unload ( ){ + this._resource = null; //this function formerly lived on the LzMakeLoad transformer this.sprite.unload(); } _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins (trunk 4 local build r7930)
Closed, tested with both the attached file and Max's test in the bug. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Date: 2007-08-16 21:07:26 -0700 (Thu, 16 Aug 2007)
New Revision: 6105
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20070816-maxcarlson-h by maxcarlson@plastik on 2007-08-16 19:59:43 PDT
in /Users/maxcarlson/openlaszlo/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
Summary: Fix resource unload/reload in dhtml
New Features:
Bugs Fixed:
LPP-4261- Unable to load and unload resources repeatedly - DHTMLTechnical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests: See
LPP-4261.Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-08-17 04:03:24 UTC (rev 6104)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-08-17 04:07:26 UTC (rev 6105)
@@ -1438,6 +1438,8 @@
this.__ImgPool.destroy();
this.__ImgPool = null;
}
+ if (this.__LZimg) this.__discardElement(this.__LZimg);
+ this.__LZimg = null;
}
/**
_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins