Author: gotcha
Date: Sat Dec  8 14:47:14 2007
New Revision: 49549

Modified:
   kukit/kukit.js/branch/finish-closures/kukit/oper.js
Log:
fixture

Modified: kukit/kukit.js/branch/finish-closures/kukit/oper.js
==============================================================================
--- kukit/kukit.js/branch/finish-closures/kukit/oper.js (original)
+++ kukit/kukit.js/branch/finish-closures/kukit/oper.js Sat Dec  8 14:47:14 2007
@@ -17,9 +17,9 @@
 * 02111-1307, USA.
 */
 
+kukit.op = new function() {   /// MODULE START
 
-
-kukit.op = {};
+var op = this;
 
 /*
 * class Oper
@@ -49,7 +49,7 @@
 *
 *  browserevent: the original browser event.
 */
-kukit.op.Oper = function (dict) {
+op.Oper = function (dict) {
     this.node = null;
     this.parms = {};
     this.eventRule = null;
@@ -61,18 +61,20 @@
     this.unrestrictedUpdate(dict);
 };
 
-kukit.op.Oper.prototype.clone = function(dict, restricted) {
+var Oper = op.Oper.prototype;
+
+Oper.clone = function(dict, restricted) {
     var newoper = new kukit.op.Oper(this);
     newoper.unrestrictedUpdate(dict, restricted);
     return newoper;
 };
 
-kukit.op.Oper.prototype.update = function(dict) {
+Oper.update = function(dict) {
     // restricted attrs must not be changed on existing oper.
     this.unrestrictedUpdate(dict, true);
 };
 
-kukit.op.Oper.prototype.unrestrictedUpdate = function(dict, restricted) {
+Oper.unrestrictedUpdate = function(dict, restricted) {
     if (typeof(dict) == 'undefined') {
         return;
     }
@@ -99,7 +101,7 @@
     }
 };
 
-kukit.op.Oper.prototype.logDebug = function() {
+Oper.logDebug = function() {
 ;;;     var result = [];
 ;;;     for (var key in this){
 ;;;         if (key == 'parms') {
@@ -115,7 +117,7 @@
 ;;;     kukit.logDebug('Oper values: ' + result.join(', '));
 };
 
-kukit.op.Oper.prototype.executeClientAction = function(name) {
+Oper.executeClientAction = function(name) {
     // Check kss action parms
     var nodes = null;
     // XXX TODO this should be refactored with parms constraint checking
@@ -166,7 +168,7 @@
     }
 };
 
-kukit.op.Oper.prototype.executeDefaultAction = function(name, optional) {
+Oper.executeDefaultAction = function(name, optional) {
     // Check kss action parms
 ;;; for (key in this.kssParms) {
 ;;;     kukit.E = 'Wrong parameter : [' + key + '] starts with "kss";';
@@ -203,7 +205,7 @@
     return success;
 };
 
-kukit.op.Oper.prototype.executeServerAction = function(name) {
+Oper.executeServerAction = function(name) {
 ;;; for (key in this.kssParms) {
 ;;;     if (key == 'kssUrl') {
 ;;;         // Value will be evaluated.
@@ -222,17 +224,17 @@
 
 /* Helpers the serve binding */
 
-kukit.op.Oper.prototype.getEventName = function () {
+Oper.getEventName = function () {
     // Gets event name
     return this.eventRule.kssSelector.name;
 };
 
-kukit.op.Oper.prototype.getEventNamespace = function () {
+Oper.getEventNamespace = function () {
     // Gets event name
     return this.eventRule.kssSelector.namespace;
 };
 
-kukit.op.Oper.prototype.hasExecuteActions = function () {
+Oper.hasExecuteActions = function () {
     // Decide if there are any actions (or a default action)
     // to execute. This can speed up execution if in case
     // we have nothing to do, there is no reason to bind
@@ -254,7 +256,7 @@
         return false;
 };
 
-kukit.op.Oper.prototype.makeExecuteActionsHook = function (filter) {
+Oper.makeExecuteActionsHook = function (filter) {
     // Factory that creates the function that executes the actions.
     // The function may take a dict that is updated on the oper 
     // If filter is specified, it will we called with a function and
@@ -286,7 +288,7 @@
 
 /* Utility for parameter checking */
 
-kukit.op.Oper.prototype.evaluateParameters =
+Oper.evaluateParameters =
     function(mandatory, defaults, errname, allow_excess) {
     // Checks if mandatory params are supplied and there are no excess params
     // also fill up default values
@@ -327,7 +329,7 @@
     this.parms = newParameters;
 };
 
-kukit.op.Oper.prototype.completeParms =
+Oper.completeParms =
     function(mandatory, defaults, errname, allow_excess) {
 ;;; var msg = 'Deprecated [Oper.completeParms],';
 ;;; msg += 'use [Oper.evaluateParameters] instead !';
@@ -335,27 +337,27 @@
     this.evaluateParameters(mandatory, defaults, errname, allow_excess);
 };
 
-kukit.op.Oper.prototype.evalBool = function(key, errname) {
+Oper.evalBool = function(key, errname) {
     var value = this.parms[key];
 ;;; kukit.E = 'for key [' + key + '] in [' + errname + '].';
     this.parms[key] = kukit.ut.evalBool(value, kukit.E);
 };
 
-kukit.op.Oper.prototype.evalInt = function(key, errname) {
+Oper.evalInt = function(key, errname) {
     var value = this.parms[key];
 ;;; kukit.E = 'for key [' + key + '] in [';
 ;;; kukit.E += errname || this.componentName + '].';
     this.parms[key] = kukit.ut.evalInt(value, kukit.E);
 };
 
-kukit.op.Oper.prototype.evalList = function(key, errname) {
+Oper.evalList = function(key, errname) {
     var value = this.parms[key];
 ;;; kukit.E = 'for key [' + key + '] in [';
 ;;; kukit.E += errname || this.componentName + '].';
     this.parms[key] = kukit.ut.evalList(value, kukit.E);
 };
 
-;;; kukit.op.Oper.prototype.debugInformation = function() {
+;;; Oper.debugInformation = function() {
 ;;; if (this.eventRule) {
 ;;;     var eventRule = this.eventRule;
 ;;;     var node = this.node;
@@ -370,3 +372,5 @@
 ;;; }
 ;;; return '';
 ;;; };
+
+}();                              /// MODULE END
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to