[Laszlo-checkins] r5718 - openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers
pbr@openlaszlo.org
pbr at openlaszlo.org
Thu Jul 19 14:42:56 PDT 2007
Author: pbr
Date: 2007-07-19 14:42:54 -0700 (Thu, 19 Jul 2007)
New Revision: 5718
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
Log:
Change 20070705-Philip-6 by Philip at Philip-DC on 2007-07-05 10:47:48 EST
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Destroying layouts can generate dhtml errors
New Features:
Bugs Fixed: LPP-4226
Technical Reviewer: jcrowley
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
The test case posted in LPP-4081 fails when run in dhtml. LPP-4081 fixed a problem with a grid column has more than one subview. It also causes a layout to be destroyed from code in basegridcolumn.lzx (determinePlacement()). I added checks in LzLayout (LaszloLayout.lzx) to make sure the view variables are initialized be
fore trying to release any layouts.
Tests:
Run the test from LPP-4081 in dhtml. It should not generate any errors.
smokecheck in dhtml and swf
Files:
M WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070705-Philip-6.tar
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs 2007-07-19 21:19:22 UTC (rev 5717)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs 2007-07-19 21:42:54 UTC (rev 5718)
@@ -290,12 +290,16 @@
* uses.
*/
function releaseLayout ( ) {
- for ( var i = this.delegates.length - 1; i >= 0; i -- ){
- this.delegates[ i ] .unregisterAll();
+ if (this.delegates) {
+ for ( var i = this.delegates.length - 1; i >= 0; i -- ){
+ this.delegates[ i ] .unregisterAll();
+ }
}
- for ( var i = this.immediateparent.layouts.length -1 ; i >= 0 ; i-- ){
- if ( this.immediateparent.layouts[ i ] == this ){
- this.immediateparent.layouts.splice( i , 1 );
+ if (this.immediateparent && this.immediateparent.layouts) {
+ for ( var i = this.immediateparent.layouts.length -1 ; i >= 0 ; i-- ){
+ if ( this.immediateparent.layouts[ i ] == this ){
+ this.immediateparent.layouts.splice( i , 1 );
+ }
}
}
}
More information about the Laszlo-checkins
mailing list