[Laszlo-dev] Setting constraints on a newed object

P T Withington ptw at pobox.com
Tue Jul 19 11:28:52 PDT 2005


Adam is right.  This will leak.  (I have on the back-burner a  
solution to that, but I haven't been able to make it work in all cases.)

On 19 Jul 2005, at 13:16, Adam Wolff wrote:

> obj._heightfun = function (){this.setAttribute( "height" ,  
> parent.width );};
> new LzDelegate( obj, "_heightfun", obj.parent, "onwidth" );
>
> I think that this'll leak if you destroy obj. If you need to fix that,
> then you need to also write a destroy method that unregisters your
> delegate.
>
> A
>
> On Jul 19, Andrew McClain wrote:
>
>
>> What's the best way to set up constraints on a javascript-created  
>> object?
>>
>> e.g.   convert <LZClass height="40" width="${parent.width}" />  
>> into javascript
>>
>>  var obj = new LZClass(this, {height: 40});
>>
>> ... then what?
>>
>>
>> andrew
>>
>> _______________________________________________
>> Laszlo-dev mailing list
>> Laszlo-dev at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>>
>>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
>



More information about the Laszlo-dev mailing list