[Laszlo-checkins] r9483 - openlaszlo/trunk/WEB-INF/lps/server/bin
max@openlaszlo.org
max at openlaszlo.org
Thu Jun 5 13:17:03 PDT 2008
Author: max
Date: 2008-06-05 13:16:58 -0700 (Thu, 05 Jun 2008)
New Revision: 9483
Modified:
openlaszlo/trunk/WEB-INF/lps/server/bin/convert_laszlo.pl
Log:
Change 20080605-maxcarlson-g by maxcarlson at Roboto on 2008-06-05 12:51:05 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Add state syntax conversions to 4.x update tool
Bugs Fixed: LPP-6005
Technical Reviewer: ptw
QA Reviewer: promanik
Doc Reviewer: (pending)
Details: Added conversions to handle transform apply=" -> applied=" and state.apply()/remove() -> setAttribute('applied', true|false)
Tests: IWFM
Modified: openlaszlo/trunk/WEB-INF/lps/server/bin/convert_laszlo.pl
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/bin/convert_laszlo.pl 2008-06-05 19:53:03 UTC (rev 9482)
+++ openlaszlo/trunk/WEB-INF/lps/server/bin/convert_laszlo.pl 2008-06-05 20:16:58 UTC (rev 9483)
@@ -52,6 +52,7 @@
setattribute - setVisible -> setAttribute('visible', ...) etc.
widthheight - getWidth(),getHeight() to width,height
tagname - constructor.classname to constructor.tagname
+ states - apply=" -> applied=", state.apply()/remove() -> setAttribute('applied', true|false)
-v
show version number and exit
@@ -80,6 +81,7 @@
$xform{setattribute}=1; # transform calls like setVisible into setAttribute(...
$xform{widthheight}=1; # transform getWidth(),getHeight() to width,height
$xform{tagname}=1; # transform constructor.classname to constructor.tagname
+$xform{states}=1; # transform apply=" -> applied=", state.apply()/remove() -> setAttribute('applied', true|false)
##
# Other global variables
@@ -308,6 +310,17 @@
s/[.]constructor[.]classname/.constructor.tagname/g;
}
+ #### transform states
+ #
+ # apply=" -> applied=", state.apply()/remove() -> setAttribute('applied', true|false)
+
+ if ($xform{states}) {
+ s/apply="/applied="/g;
+ s/[.]apply\w*?\(\w*?\)/.setAttribute('applied', true)/g;
+ s/[.]remove\w*?\(\w*?\)/.setAttribute('applied', false)/g;
+ }
+
+
debugln(3, " EMIT CONTENT: " . $_);
print $FH $_;
$_ = $save;
More information about the Laszlo-checkins
mailing list