[Laszlo-dev] Looking at 'No eventSender' error
Philip Romanik
promanik at laszlosystems.com
Mon Nov 27 10:17:12 PST 2006
Hi Tucker,
I'm looking into LPP-3141 to see why the 'No eventSender' message is
generated. I think I should fix LzNode.applyConstraint() to not call
LzDelegate.register() when the object is null. I'm looking at a case from
basecomponent.lzx:
<attribute name="_enabled"
value="${this.enabled && (this._parentcomponent ?
this._parentcomponent._enabled : true)}"
setter="this._setEnabled(_enabled)"/>
As I understand constraints, the dependency [this._parentcomponent,
'_enabled'] will generate on_enabled events. This will happen even if
this._parentcomponent is null.
If this._parentcomponent is null, the error message gets printed by
LzDelegate.register(). But if I fix LzNode.applyConstraint(),
function applyConstraint ( prop , cfunc, dep ){
...
if ( dep.length ){
var l = dep.length;
for ( var i = 0 ; i < l ; i+=2 ){
if (dep[ i ]) { // ***NEW LINE
var d = new LzDelegate( this , refF );
this.__LZdelegates.push( d );
d.register( dep[ i ] , "on" + dep[ i + 1 ] );
} // ***NEW LINE
}
}
...
}
everything works. Removing the error message in LzDelegate.register() seems
wrong to me. What do you think?
Phil
More information about the Laszlo-dev
mailing list