[Laszlo-dev] RE: Idle callbacks are the devil's tools!
Oliver Steele
steele at laszlosystems.com
Thu Jun 9 18:10:56 PDT 2005
On Jun 9, 2005, at 8:22 PM, mdavis wrote:
> Max Carlson wrote:
>
>> This seems like a bad idea to me. I've had a lot of cases where I
>> wanted to bind a method to an event, invoke it by name directly.
>>
>> Another thing that would be nice is if onevent could take a list,
>> allowing a single method could bind to multiple events. One case
>> where I've wanted this is when I want a drawview to redraw when
>> its height or width are changed. As of now, I have to have the
>> event bindings invoke a third method.
>>
>>
> I'm with Max here. having the distinction between name= and event=
> is a good thing. It may seem silly to have code like:
> <method event="onconstruct">
> redraw();
> </method>
> <method event="onwidth">
> redraw();
> </method>
> <method event="onheight">
> redraw();
> </method>
> <method event="onvalue" reference="parent.slider">
> redraw();
> </method>
> <method name="redraw">
> ....
> </method>
>
> But boy is it easy to manage.
Easier than this?
<method name="onconstruct">
redraw();
</method>
<method name="onwidth">
redraw();
</method>
<method name="onheight">
redraw();
</method>
<method name="onvalue" reference="parent.slider">
redraw();
</method>
<method name="redraw">
....
</method>
More information about the Laszlo-dev
mailing list