Title: RE: [Laszlo-user] Code Refactoring?

On this same note, I think it would be beneficial to allow post-definition modification of a classes internal views at instantiation, for example:

<class name="foo">
  <view name="a" />
  <button name="b" />
</class>


<foo>
  <method event='this.b.onclick'>
    //some code
  </method>
</foo>


Can we already do something like this? This would really help me to keep my code cleaner. I realize I might be able to do something like:

<foo>
  <method name='bar'>
    //some code
  </method>
  <method event='onconstruct'><![CDATA[
    var del = new LzDelegate(this.b, 'bar');
    del.register(this.b, 'onclick');
  ]]></method>
</foo>

But that's a lot messier, it's less clear what I'm trying to do, and it requires a deeper knowledge of Lazlo's internals than is necessary for the problem.

-Dave

(yanl: Yet Another New Lazlo-er)

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to