[Laszlo-checkins] r10890 - in openlaszlo/trunk/WEB-INF/lps: lfc/data lfc/kernel/swf server/bin
max@openlaszlo.org
max at openlaszlo.org
Fri Sep 5 11:07:42 PDT 2008
Author: max
Date: 2008-09-05 11:07:35 -0700 (Fri, 05 Sep 2008)
New Revision: 10890
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
openlaszlo/trunk/WEB-INF/lps/server/bin/convert_required.pl
Log:
Change 20080904-maxcarlson-M by maxcarlson at Bank on 2008-09-04 11:41:47 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Update convert_required.pl to handle services
Bugs Fixed: LPP-6927 - convert_required.pl needs to handle service globals, LPP-6932 - Change LzParam -> lz.Param where possible
Technical Reviewer: dda
QA Reviewer: promanik
Documentation: convert_required.pl now handles service globals, e.g. LzKeys -> lz.Keys
Details: LzLoadQueue.as, LzHTTPDataProvider.lzx, LzDataset.lzs, LzParam.lzs - Change LzParam to lz.Param where possible.
convert_required.pl - Add missing global classes, add services.
Tests: convert_required.pl now handles case 2) properly. Updated so running 'convert_required.pl -t' includes examples from LPP-6927. Added missing global and service classes.
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-09-05 16:11:27 UTC (rev 10889)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-09-05 18:07:35 UTC (rev 10890)
@@ -425,7 +425,7 @@
*/
function getParams () :LzParam {
if (this.params == null) {
- this.params = new LzParam();
+ this.params = new lz.Param();
}
return this.params;
@@ -526,10 +526,10 @@
function setQueryString( s ) {
this.params = null;
if ( typeof( s ) == "object" ){
- if (s instanceof LzParam){
+ if (s instanceof lz.Param){
this.querystring = s.toString();
} else {
- var p = new LzParam ();
+ var p = new lz.Param ();
for ( var n in s ) {
p.setValue( n, s[n], true );
}
@@ -618,7 +618,7 @@
function setQueryParam( key , val ) {
this.querystring = null;
if ( ! this.params ){
- this.params = new LzParam();
+ this.params = new lz.Param();
}
this.params.setValue( key, val );
@@ -639,7 +639,7 @@
function setQueryParams( o ) {
this.querystring = null;
if ( ! this.params ){
- this.params = new LzParam();
+ this.params = new lz.Param();
}
if ( o ) {
@@ -724,8 +724,8 @@
// values. Note, this is independent of the query portion of the
// this.src URL.
if (this.querystring) {
- dreq.queryparams = new LzParam();
- dreq.queryparams.addObject(LzParam.parseQueryString(this.querystring));
+ dreq.queryparams = new lz.Param();
+ dreq.queryparams.addObject(lz.Param.parseQueryString(this.querystring));
} else {
// otherwise, use the this.params value
dreq.queryparams = this.params;
@@ -902,7 +902,7 @@
*/
function setHeader ( k , val ){
if ( !this.headers ) {
- this.headers = new LzParam();
+ this.headers = new lz.Param();
}
this.headers.setValue( k , val );
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-09-05 16:11:27 UTC (rev 10889)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-09-05 18:07:35 UTC (rev 10890)
@@ -276,7 +276,7 @@
* @param LzDataElement data:
*/
function loadResponse( dreq, data ) {
- var headers = new LzParam( );
+ var headers = new lz.Param( );
// build a hashtable of header values.
// If the header is repeated, construct a list to hold
// all its values.
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs 2008-09-05 16:11:27 UTC (rev 10889)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParam.lzs 2008-09-05 18:07:35 UTC (rev 10890)
@@ -10,14 +10,14 @@
*/
/**
- * <p>LzParam provide utilities for manipulating name-value pairs.
- * For example, LzParam objects can be used to manage a name/value pairs for an
+ * <p>lz.Param provides utilities for manipulating name-value pairs.
+ * For example, lz.Param objects can be used to manage a name/value pairs for an
* HTTP request.</p>
*
* <programlisting>
* <method name="sendData" args="action">
* var d=canvas.datasets.dsSendData;
- * var p=new LzParam();
+ * var p=new lz.Param();
* p.addValue( "action", action, true);
* p.addValue( "firstName", "Bob", true);
* p.addValue( "lastName", "Jones", true);
@@ -29,7 +29,7 @@
* </programlisting>
*
* @shortdesc A utility class for manipulating name-value pairs
- * @devnote LzParam objects hold onto parameters (name/value pairs) and provide methods
+ * @devnote lz.Param objects hold onto parameters (name/value pairs) and provide methods
* and utilities to reserialize them. They are used whenever case matters for
* keys or parameter names (objects don't work here...)
*
@@ -77,13 +77,13 @@
/**
* Parse a URL query string, returns an object with key-value pairs
* @return Object
- * @deprecated: Use LzParam.parseQueryString() instead
+ * @deprecated: Use lz.Param.parseQueryString() instead
*/
function parseQueryString (query:String) :Object {
if ($debug) {
- Debug.info(this, ".parseQueryString is deprecated. Use LzParam.parseQueryString instead");
+ Debug.info(this, ".parseQueryString is deprecated. Use lz.Param.parseQueryString instead");
}
- return LzParam.parseQueryString(query);
+ return lz.Param.parseQueryString(query);
}
/**
@@ -97,7 +97,7 @@
}
/**
- * Returns a clone of this LzParam. Argument is deprecated.
+ * Returns a clone of this lz.Param. Argument is deprecated.
* @keywords deprecated: Argument is deprecated
* @return LzParam
*/
@@ -105,7 +105,7 @@
if ($debug) {
if (arg) Debug.info("%w.%s is deprecated. Do not pass as argument to clone()", this, arguments.callee);
}
- var o:LzParam = new LzParam();
+ var o:LzParam = new lz.Param();
for (var n:String in this.d) {
o.d[ n ] = this.d[ n ].concat();
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as 2008-09-05 16:11:27 UTC (rev 10889)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as 2008-09-05 18:07:35 UTC (rev 10890)
@@ -455,7 +455,7 @@
uquery = url.substring(marker+1, url.length);
url_noquery = url.substring(0,marker);
- var uitems = LzParam.parseQueryString(uquery);
+ var uitems = lz.Param.parseQueryString(uquery);
for ( var key in uitems) {
lvar[key] = uitems[key];
}
@@ -480,7 +480,7 @@
var content = loadobj.rawpostbody;
// Copy the postbody data onto the LoadVars, it will be POST'ed
- var pdata = LzParam.parseQueryString(content);
+ var pdata = lz.Param.parseQueryString(content);
for ( var key in pdata) {
lvar[key] = pdata[key];
}
@@ -514,7 +514,7 @@
} else {
var content = loadobj.rawpostbody;
// Copy the postbody data onto the LoadVars, it will be POST'ed
- var pdata = LzParam.parseQueryString(content);
+ var pdata = lz.Param.parseQueryString(content);
for ( var key in pdata) {
lvar[key] = pdata[key];
}
Modified: openlaszlo/trunk/WEB-INF/lps/server/bin/convert_required.pl
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/bin/convert_required.pl 2008-09-05 16:11:27 UTC (rev 10889)
+++ openlaszlo/trunk/WEB-INF/lps/server/bin/convert_required.pl 2008-09-05 18:07:35 UTC (rev 10890)
@@ -98,6 +98,7 @@
# This list is derived from:
# WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
my %lzxname = (
+ # global classes
LzNode => "lz.node",
LzView => "lz.view",
LzText => "lz.text",
@@ -118,6 +119,21 @@
LzDatasource => "lz.datasource",
LzHTTPDataProvider => "lz.lzhttpdataprovider",
LzLibrary => "lz.import",
+ LzDelegate => "lz.Delegate",
+ LzParam => "lz.Param",
+ # service classes
+ LzTimer => "lz.Timer",
+ LzTrack => "lz.Track",
+ LzGlobalMouse => "lz.GlobalMouse",
+ LzKeys => "lz.Keys",
+ LzIdle => "lz.Idle",
+ LzCursor => "lz.Cursor",
+ LzModeManager => "lz.ModeManager",
+ LzInstantiator => "lz.Instantiator",
+ LzFocus => "lz.Focus",
+ LzBrowser => "lz.Browser",
+ LzHistory => "lz.History",
+ LzAudio => "lz.Audio",
);
# This list of known classes. We add to it each time
@@ -199,10 +215,12 @@
"y = new myotherclass // want lz.myotherclass\n" .
"y = new global[zz] // want lz[zz]\n" .
"y = new somethingelse[*]\n" .
- "y = n instanceof LzParam\n" .
"y = n instanceof LzView // want lz.view\n" .
"y = new LzView(new Integer(new LzNode(), new LzView)) // 3 subs\n" .
"</class>" .
+ "y = n instanceof LzParam\n // want lz.Param" .
+ "var f=LzFocus.getFocus(); // want lz.Focus" .
+ "<handler name=\"onkeydown\" reference=\"LzKeys\" args=\"keycode\"> // want lz.Keys" .
"<class name=\"myotherclass\"/>\n";
close OUT;
More information about the Laszlo-checkins
mailing list