Revision: 1947
http://svn.sourceforge.net/vexi/?rev=1947&view=rev
Author: mkpg2
Date: 2007-07-08 09:18:18 -0700 (Sun, 08 Jul 2007)
Log Message:
-----------
Forward porting feature from Vexi2. vexi.params.
Modified Paths:
--------------
core/trunk/org.vexi.core/src/org/vexi/core/Main.java
Modified: core/trunk/org.vexi.core/src/org/vexi/core/Main.java
===================================================================
--- core/trunk/org.vexi.core/src/org/vexi/core/Main.java 2007-07-08
16:15:24 UTC (rev 1946)
+++ core/trunk/org.vexi.core/src/org/vexi/core/Main.java 2007-07-08
16:18:18 UTC (rev 1947)
@@ -12,6 +12,7 @@
import org.ibex.js.Fountain;
import org.ibex.js.JS;
import org.ibex.js.JSExn;
+import org.ibex.js.JSU;
import org.ibex.js.Scheduler;
import org.ibex.js.Fountain.Multiple;
import org.ibex.util.Basket;
@@ -27,6 +28,8 @@
public static String origin = null;
public static String initialTemplate = "main";
+ public static JS params = new JS.Obj();
+
public static final Fountain vera;
public static final Fountain scar;
@@ -125,7 +128,7 @@
String startupTemplate = null;
for (int i=startargs; i<args.length; i++) {
if (args[i].indexOf('=') != -1) {
- loadParamValue(args[i], null);//paramValues);
+ loadParam(args[i]);
}
else {
rr = Resources.cacheableForName(args[i]);
@@ -204,7 +207,7 @@
- private static void loadParamValue(String param, Basket.Hash values) {
+ private static void loadParam(String param) {
int pos = param.indexOf('=');
String key = param.substring(0, pos);
String value = param.substring(pos+1);
@@ -214,10 +217,12 @@
value = value.substring(1, len-1);
}
else if (value.charAt(0) == '\'' && value.charAt(len-1) == '\'') {
- value = value.substring(1, len-1);
- }
+ value = value.substring(1, len-1);
+ }
}
- values.put(key, value);
+ try{
+ params.put(JSU.S(key), JSU.S(value));
+ }catch(JSExn e){Log.warn(Main.class, e);/*Should not happen */}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn