[Laszlo-dev] conversion question
Max Carlson
max at openlaszlo.org
Fri Apr 4 20:41:39 PDT 2008
It only matters if someone is expecting a method named setupdbl to be there.. Since this is a testcase, i'd say it doesn't matter.
-----Original Message-----
From: Donald Anderson <dda at ddanderson.com>
Sent: Tuesday, April 01, 2008 08:32 AM
To: P T Withington <ptw at pobox.com>
Cc: Max Carlson <max at openlaszlo.org>; OpenLaszlo Developers <laszlo-dev at openlaszlo.org>
Subject: conversion question
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