> Yes. This is already permitted. As it happens, Henry is working on extending the mixin feature to instances too. > We realized that it was a hole in the "instance first" model: http://jira.openlaszlo.org/jira/browse/LPP-8602

Sweet.

> The model of node inheritance is that you get a union of all the nodes, rather than overriding. > I can see what you are getting at, but that would be a huge change in the language. > I think we would have to have some really compelling use cases to consider that level of change.

I totally agree.

I was thinking of implementing partially the node override in "userspace" like this

<class name="someclass">
   <view name="foo"/>
   <view name="x">
       <method name="m">
           doA();
       </method>
   </view>
</class>

<someclass with="replaceable">
   <replace path="x">
       <view name="y">
           <method name="n">
               doB();
           </method>
       </view>
  </replace>
</someclass>

<mixin name="replaceable">
Overrides the createChildren where it looks for immediate children with name replace. From it, it retrieves path attribute and using the path replaces the child matching the path with the children of
   replace. And finally removes the replace child.
</mixin>

This feature can not be achieved with extendable/extend tags because I can not extend some arbitrary node instance.

What do you think?

-rami


Reply via email to