Author: gotcha
Date: Sun Dec 23 11:36:44 2007
New Revision: 50033

Modified:
   kukit/kukit.js/branch/finish-closures/kukit/resourcedata.js
Log:
unindent KssMethodValue

Modified: kukit/kukit.js/branch/finish-closures/kukit/resourcedata.js
==============================================================================
--- kukit/kukit.js/branch/finish-closures/kukit/resourcedata.js (original)
+++ kukit/kukit.js/branch/finish-closures/kukit/resourcedata.js Sun Dec 23 
11:36:44 2007
@@ -175,47 +175,52 @@
 /*
 *  class KssMethodValue
 */
-rd.KssMethodValue = function(methodName, args) {
+rd.KssMethodValue = function() {
+
+this.initialize = function(methodName, args) {
     // A method parameter in the format 
     //      key: methodName(v1, v2, ... vn);
     this.methodName = methodName;
     this.args = args;
-    this.check = function(registry) {
-        // Check syntax
-        var f = registry.get(this.methodName);
-        this.pprovider = new f();
-        for(i=0; i < this.args.length; i++){
-            // XXX We treat text values separetly because
-            // they are now currently wrapped as KssTextValue
-            // (as they should). TODO
-            var arg = this.args[i];
-            if(arg.check){
-                // With the recursion we always use the global
-                // provider registry
-                arg.check(kukit.pprovidersGlobalRegistry);
-            }
+};
+
+this.check = function(registry) {
+    // Check syntax
+    var f = registry.get(this.methodName);
+    this.pprovider = new f();
+    for(i=0; i < this.args.length; i++){
+        // XXX We treat text values separetly because
+        // they are now currently wrapped as KssTextValue
+        // (as they should). TODO
+        var arg = this.args[i];
+        if(arg.check){
+            // With the recursion we always use the global
+            // provider registry
+            arg.check(kukit.pprovidersGlobalRegistry);
         }
-    ;;; this.pprovider.check(this.args);
-    };
+    }
+;;; this.pprovider.check(this.args);
+};
 
-    this.evaluate =
-        function(node, defaultParameters) {
-        // First recursivly evaluate all arguments
-        var newArgs = [];
-        for(var i=0; i < this.args.length; i++){
-            // XXX We treat text values separetly because
-            // they are now currently wrapped as KssTextValue
-            // (as they should). TODO
-            var arg = this.args[i];
-            if(arg.evaluate){
-                newArgs.push(arg.evaluate(node, defaultParameters));
-            } else {
-                newArgs.push(arg);
-            }
+this.evaluate =
+    function(node, defaultParameters) {
+    // First recursivly evaluate all arguments
+    var newArgs = [];
+    for(var i=0; i < this.args.length; i++){
+        // XXX We treat text values separetly because
+        // they are now currently wrapped as KssTextValue
+        // (as they should). TODO
+        var arg = this.args[i];
+        if(arg.evaluate){
+            newArgs.push(arg.evaluate(node, defaultParameters));
+        } else {
+            newArgs.push(arg);
         }
-        // return the value
-        return this.pprovider.eval(newArgs, node, defaultParameters);
-    };
+    }
+    // return the value
+    return this.pprovider.eval(newArgs, node, defaultParameters);
+};
+this.initialize.apply(this, arguments);
 };
 rd.KssMethodValue.prototype.isMethod = true;
 
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to