I sometimes get sad when a good person like Oliver wakes up one bright
morning and says: "here's a useful thing I think we should do" and then a
lot of discussion ensues and then we end up agreeing that, yeah, this
would be nice to have but to do it right we really need to implement
namespaces, fix five bugs, and refactor the LFC inheritance hierarchy.
I suppose that's the nature of the beast at this moment, but it sure can
be discouraging.
Anyway on Dec 20, Jim Grandy wrote:
[snip]
> I've seen code in various places in the LFC and components that creates
> event handlers with reference attributes to hook into events in a parent
> view. Granted it is manual, not automatic like states, but couldn't this
> technique be used to build attachment classes that simply register for
> events at initialization?
[snip]
So are you proposing a transformer class (not like an LFC transformer)
which tends to be used as a singleton and which takes LzNode instances and
tinkers with them? e.g.
<transformer name="trMouseView">
<method name="transform" args="v">
v.addAttribute( "mouseisin" , false );
v.bindEventHandler( "onmouseover" , this.setMouseIsInTrue );
...
</method>
<method name="setMouseIsInTrue">
this.setAttribute( "mouseisin" , true );
</method>
...
</transformer>
A
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev