[Laszlo-checkins] r11967 - openlaszlo/trunk/WEB-INF/lps/lfc/data
bargull@openlaszlo.org
bargull at openlaszlo.org
Wed Dec 3 12:02:06 PST 2008
Author: bargull
Date: 2008-12-03 12:02:04 -0800 (Wed, 03 Dec 2008)
New Revision: 11967
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
Log:
Change 20081203-bargull-Srt by bargull at dell--p4--2-53 on 2008-12-03 01:24:02
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: check context's type
New Features:
Bugs Fixed: LPP-7423
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
The context must be a LzDatapath, otherwise it doesn't make much sense to look at "__LZdepChildren".
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-12-03 16:25:26 UTC (rev 11966)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-12-03 20:02:04 UTC (rev 11967)
@@ -410,15 +410,14 @@
ip.applyData( this.data );
}
}
-
}
/**
* @access private
*/
-override function setDataContext ( p, implicit:Boolean = false) :void {
- if (p == null && this.immediateparent != null) {
- p = this.immediateparent.searchParents( "datapath" ).datapath;
+override function setDataContext (dc, implicit:Boolean = false) :void {
+ if (dc == null && this.immediateparent != null) {
+ dc = this.immediateparent.searchParents( "datapath" ).datapath;
implicit = true;
} else if ($debug) {
if (this.immediateparent == null) {
@@ -426,31 +425,32 @@
}
}
- if ( p == this.context ) return;
+ if ( dc == this.context ) return;
if ( implicit ){
- if ( p.__LZdepChildren == null ){
- p.__LZdepChildren = [ this ];
+ if ( dc.__LZdepChildren == null ){
+ dc.__LZdepChildren = [ this ];
} else {
- p.__LZdepChildren.push( this );
+ dc.__LZdepChildren.push( this );
}
} else {
//not a depedent child
- var dclist:Array = null;
- if ( this.context ) dclist = this.context.__LZdepChildren;
- if ( dclist ){
- //remove self from list
- for ( var i:int = 0; i < dclist.length; i++ ){
- if ( dclist[ i ] === this ){
- dclist.splice( i , 1 );
- break;
+ if ( this.context && this.context is LzDatapath ){
+ var dclist:Array = this.context.__LZdepChildren;
+ if ( dclist ){
+ //remove self from list
+ for ( var i:int = 0; i < dclist.length; i++ ){
+ if ( dclist[ i ] === this ){
+ dclist.splice( i, 1 );
+ break;
+ }
}
}
}
}
-
- super.setDataContext( p );
+
+ super.setDataContext( dc );
}
@@ -474,7 +474,6 @@
}
}
}
-
}
var ip:LzNode = this.immediateparent;
More information about the Laszlo-checkins
mailing list