[Laszlo-checkins] r10219 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/swf lps/components/base
bargull@openlaszlo.org
bargull at openlaszlo.org
Fri Jul 4 10:16:52 PDT 2008
Author: bargull
Date: 2008-07-04 10:16:45 -0700 (Fri, 04 Jul 2008)
New Revision: 10219
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/trunk/lps/components/base/basegrid.lzx
openlaszlo/trunk/lps/components/base/basegridcolumn.lzx
openlaszlo/trunk/lps/components/base/basegridrow.lzx
Log:
Change 20080703-bargull-r5m by bargull at dell--p4--2-53 on 2008-07-03 22:43:07
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix debug-warnings in grid
New Features:
Bugs Fixed: LPP-6605
Technical Reviewer: promanik
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Use proper delegate-handling in LzSprite,
updated column->cell dependency to avoid debug-message about a "dynamic method".
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-07-04 16:07:18 UTC (rev 10218)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-07-04 17:16:45 UTC (rev 10219)
@@ -1348,7 +1348,7 @@
if (! this._moDel) {
this._moDel = new LzDelegate( this , '_cursorGotMouseover',
this.owner , 'onmouseover');
- this._muDel = new LzDelegate( LzMouseKernel , 'restoreCursor',
+ this._muDel = new LzDelegate( this , '_cursorGotMouseout',
this.owner , 'onmouseout');
}
@@ -1373,6 +1373,11 @@
LzMouseKernel.setCursorGlobal(this._cures);
}
+/** @access private */
+LzSprite.prototype._cursorGotMouseout = function(ignore) {
+ LzMouseKernel.restoreCursor();
+}
+
/**
* @access private
*/
Modified: openlaszlo/trunk/lps/components/base/basegrid.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basegrid.lzx 2008-07-04 16:07:18 UTC (rev 10218)
+++ openlaszlo/trunk/lps/components/base/basegrid.lzx 2008-07-04 17:16:45 UTC (rev 10219)
@@ -440,7 +440,7 @@
</method>
<!--- @keywords private -->
- <method name="inferColumns" args="v">
+ <method name="inferColumns" args="ignore=null" >
<![CDATA[
var res = this.datapath.xpathQuery( this.contentdatapath );
if ( ! res ) return;
Modified: openlaszlo/trunk/lps/components/base/basegridcolumn.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basegridcolumn.lzx 2008-07-04 16:07:18 UTC (rev 10218)
+++ openlaszlo/trunk/lps/components/base/basegridcolumn.lzx 2008-07-04 17:16:45 UTC (rev 10219)
@@ -89,24 +89,32 @@
return parent.content;
} else {
return super.determinePlacement.apply(this, arguments);
-// return super.determinePlacement( v , p , args );
}
</method>
<!--- @keywords private -->
<method name="_getCellForColumn">
- if ( !_contentsPackage ) return null;
-
- if ( _contentsPackage.length == 1 ) {
- var o = _contentsPackage[ 0 ];
- o.attrs.ownerColumn = this;
+ if ( !this._contentsPackage ) return null;
+
+ var fupdCellBounds = function(ignore=null) {
+ //'this' points to the grid cell
+ this.setX( this.ownerColumn.x );
+ this.setWidth( this.ownerColumn.colwidth );
+ };
+
+ var contentspkg = this._contentsPackage;
+ if ( contentspkg.length == 1 ) {
+ var o = contentspkg[ 0 ];
+ var cellargs = o.attrs;
+ cellargs.ownerColumn = this;
+ cellargs._updateCellBounds = fupdCellBounds;
return o;
+ } else {
+ //there's more than one subview, so we need to pack them up
+ return { 'class': lz.view,
+ attrs: {ownerColumn: this, _updateCellBounds: fupdCellBounds},
+ children: contentspkg };
}
-
- //else, there's more than one subview, so we need to pack them up
- return { 'class': lz.view,
- attrs: { ownerColumn : this },
- children: _contentsPackage };
</method>
<!--- @keywords private -->
Modified: openlaszlo/trunk/lps/components/base/basegridrow.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basegridrow.lzx 2008-07-04 16:07:18 UTC (rev 10218)
+++ openlaszlo/trunk/lps/components/base/basegridrow.lzx 2008-07-04 17:16:45 UTC (rev 10219)
@@ -185,14 +185,8 @@
its column owner.-->
<handler name="onaddsubview" args="sv">
if ( !sv [ "ownerColumn"] ) return;
- sv._updateIt = this._updateIt;
- var d = new LzDelegate( sv , "_updateIt", sv.ownerColumn,"onx");
- d.register( sv.ownerColumn,"oncolwidth" );
- sv._updateIt();
+ sv.applyConstraintMethod("_updateCellBounds", [sv.ownerColumn, "x", sv.ownerColumn, "colwidth"]);
</handler>
- <attribute name="_updateIt"
- value="function(ignore){this.setX( this.ownerColumn.x );
- this.setWidth( this.ownerColumn.colwidth)}"/>
<doc>
<tag name="shortdesc"><text></text></tag>
<text>
More information about the Laszlo-checkins
mailing list