[Laszlo-dev] conversion question

Donald Anderson dda at ddanderson.com
Tue Apr 1 07:32:49 PDT 2008


Tucker,

Max gave me this recipe for conversion:

   <method event="foo" args="bar" name="blarg">...</method>    ->
       <handler name="foo" method="blarg"/><method name="blarg"  
args="bar">...</method>

For testing, I pulled out the 'before' (r7958) and 'after' (r7959) of  
your big change
that affected many files in test/*.lzx , ran the convertor on the  
'before', and compared
with the 'after'.  Everything seems to match up, except test/ 
doubleclick.lzx

=> before/doubleclick.lzx <==

     <method name="setupdbl" event="oninit">
       this.dblDel = new LzDelegate(this, "clearClicks");
     </method>

==> after/doubleclick.lzx <==

     <handler name="oninit">
       this.dblDel = new LzDelegate(this, "clearClicks");
     </handler>

==> converted/doubleclick.lzx <==

     <handler name="oninit" method="setupdbl" /><method name="setupdbl">
       this.dblDel = new LzDelegate(this, "clearClicks");
     </method>

My convertor uses the above recipe when there is a name,
and even in this case when there are no args.  Your conversion
is simpler.   Does it matter?

Both yours and mine run (as well as the old, with warnings).

Thanks,

- Don

--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com






More information about the Laszlo-dev mailing list