Author: reebalazs
Date: Tue Dec 25 12:58:42 2007
New Revision: 50077

Modified:
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/   (props changed)
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/dom.js
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/eventreg.js
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/interfaces.js
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kssparser.js
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kukit.js
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/resourcedata.js
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/service.js
   
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_interfaces.js
   
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_kssparser.js
Log:
Simplify interfaces.
Now finalization is done in a singleton which is
automatically stored on interfaces.

Modified: kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/dom.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/dom.js        
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/dom.js        
Tue Dec 25 12:58:42 2007
@@ -77,7 +77,7 @@
 ;;;    kukit.E = 'Selection error in kukit.dom.cssQuery';
         throw new Error(kukit.E);
     }
-    return kukit.engine.coreinterface.cssQuery(selector, inNodes);
+    return kukit.global.core.cssQuery(selector, inNodes);
 };
 
 /*

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/eventreg.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/eventreg.js   
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/eventreg.js   
Tue Dec 25 12:58:42 2007
@@ -71,7 +71,7 @@
         }
         namespacedEventNames.push(eventName);
         // register the event informataion
-        var events = kukit.interfaces.get('events', 
kukit.interfaces.PluginMethodDescriptor);
+        var events = kukit.interfaces.global.get('events', 
kukit.interfaces.PluginMethodDescriptor);
         events.getMethodDescriptor(eventName).register({
             eventName: eventName,
             defaultMethodName: null,
@@ -80,7 +80,7 @@
     }
     // Register the bind iteration
     //this._registerEventSet(namespace, eventNames, iterName, bindMethodName);
-    var binditerations = kukit.interfaces.getBindIteration();
+    var binditerations = kukit.interfaces.global.get('binditerations', 
kukit.interfaces.BindIterationDescriptor);
     binditerations.getMethodDescriptor('').register({
             namespace: namespace,
             eventNames: namespacedEventNames,
@@ -98,7 +98,7 @@
         eventName = namespace + '-' + eventName;
     }
     // var entry = this.content[key];
-    var events = kukit.interfaces.get('events', 
kukit.interfaces.PluginMethodDescriptor);
+    var events = kukit.interfaces.global.get('events', 
kukit.interfaces.PluginMethodDescriptor);
     var entry = events.getMethodDescriptor(eventName)
     if (! entry.config) {
 ;;;     kukit.E = 'Error : undefined event [' + eventName + '].';

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/interfaces.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/interfaces.js 
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/interfaces.js 
Tue Dec 25 12:58:42 2007
@@ -1,10 +1,67 @@
 
 kukit.interfaces = new function() {  /* BEGIN CLOSURE kukit.interfaces */
 
-var InterfaceDescriptor = function(name, MethodDescriptor) {
+/* 
+ * Kukit interfaces
+ *
+ * Warning: this is not comparable with Zope interfaces. It has much smaller
+ * scope and aims at a different use case.
+ *
+ * We want a way to initialize a "set of attributes". These can be
+ * the registered vents, actions, etc., or methods of a service interface.
+ * The initialization of these attributes depends only on what javascript 
+ * code is present and how it is defining these interfaces.
+ *
+ * The atributes or methods have method descriptors that can get their
+ * methods called and have a state that represents offers and demands on
+ * that given attribute or method.
+ *
+ * In case of an action plugin, this is just storing registry info keyed by
+ * the action name. However in case of a service interface, different 
components
+ * may provide the requested item, and the final value of the method is decided
+ * at finalization and all this logic is handled by the method descriptor.
+ * In case of service interfaces, this allows that "define service"
+ * and "provide service" sections can be in different javascript files 
(plugins),
+ * and the final outcome is independent of the order of their execution.
+ *
+ * The order in which this is made is irrelevant, after kukit.interfaces is
+ * included.
+ *
+ * An interface needs to be finalized before being used, and all
+ * methods will be finalized this time as well.
+ *
+ * After being finalized, all named interfaces can be accessed from
+ * the interfaces object, e.g.:
+ *
+ *    interfaces.events.click           - is an event's registry
+ *    interfaces.actions.setAttr        - is an action's registry
+ *    interfaces.core.cssQuery          - is a core service method
+ *    interfaces.core.forEach           - is a core service method
+ *
+ *
+ * This is not an API. It _can_ be used for generic purpose in any
+ * component, though.
+ *
+ * Kukit sets up the following interfaces for itself. The finalization
+ * of these interfaces is done by kukit at the beginning of bootstrap.
+ *
+ * name                                     class
+ * ----                                     -----
+ * core            core services            
kukit.interfaces.ServiceMethodDescriptor
+ * events          kss event name registry  
kukit.interfaces.PluginMethodDescriptor
+ * binditerations  kss event binding reg.   
kukit.interfaces.BindIterationDescriptor
+ * actions         kss action registry      
kukit.interfaces.PluginMethodDescriptor
+ * selectors       kss selector registry    
kukit.interfaces.PluginMethodDescriptor
+ * valueproviders  value provider registry  
kukit.interfaces.PluginMethodDescriptor
+ *
+ *  For more information, see ../tests/test_interfaces.js .
+ * 
+ */
+var InterfaceDescriptor = function(interfaces, name, MethodDescriptor) {
     // A parameters are the name of the interface, and 
     // the method descriptor class it uses.
     //
+    this.interfaces = interfaces;
     this.name = name;
     this.finalized = false;
     this.registry = {};
@@ -53,7 +110,12 @@
         }
     };
 
-    this.finalize = function(klass, loader) {
+    this.finalize = function(singleton, loader) {
+        // singleton: the singleton we want to finalize on.
+        // loader (optional): use it for all operations
+        //   (this means we never get errors but the loader
+        //   will be set up to load missing resources)
+        //
         // Check if we are finalized.        
         if (this.finalized) {
 ;;;         kukit.E = 'Attempt to finalize already finalized plugin interface 
[';
@@ -62,13 +124,13 @@
         }
         // Finalize all methods.
         this.forEachMethod(function(methodName, methodDescriptor) {
-            // Finalize them
-            var methodFunc = methodDescriptor.finalize(loader);
-            // store the functions on the class's prototype
-            klass.prototype[methodName] = methodFunc;
+            // finalize the functions and store them on the singleton
+            singleton[methodName] = methodDescriptor.finalize(loader);
             });
-        // store myself (the interface descriptor) on the class
-        klass.prototype.interface = this;
+        // store myself (the interface descriptor) on the singleton
+        singleton.interface = this;
+        // Store the singleton itself on interfaces
+        this.interfaces[this.name] = singleton;
         // Set finalized state.
         // We are finalized if the loader has no items to load.
         // If there is no loader, we are finalized always.
@@ -94,7 +156,7 @@
         var interfaceDescriptor;
         interfaceDescriptor = this.registry[name];
         if (typeof(interfaceDescriptor) == 'undefined') {
-            interfaceDescriptor = this.registry[name] = new 
InterfaceDescriptor(name, MethodDescriptor);
+            interfaceDescriptor = this.registry[name] = new 
InterfaceDescriptor(this, name, MethodDescriptor);
         } else {
             if (interfaceDescriptor.MethodDescriptor != MethodDescriptor) {
 ;;;             kukit.E = 'Interface "' + name + '" already has a different 
method descriptor specified earlier.';
@@ -297,31 +359,14 @@
  * Instantiation
  */
 
-this._createInterfaces = function() {
+this._createGlobalInterfaces = function() {
     // create singleton for interfaces
-    this._interfaces = new this.Interfaces();
+    this.global = new this.Interfaces();
 };
-this._createInterfaces();
+this._createGlobalInterfaces();
 
 // The following methods can acquire a given interface
 
-// wrap the function, since there are no bound methods in JS
-this.get = function(name, MethodDescriptor) {
-    return this._interfaces.get(name, MethodDescriptor);
-};
-this.getService = function(name) {
-    return this._interfaces.get(name, this.ServiceMethodDescriptor);
-};
-this.getPlugin = function(name) {
-    return this._interfaces.get(name, this.PluginMethodDescriptor);
-};
-this.getBindIteration = function(name) {
-    // convenience, we use only 1 of this anyway
-    if (typeof(name) == 'undefined') {
-        name = 'binditerations';
-    }
-    return this._interfaces.get(name, this.BindIterationDescriptor);
-};
 
 /* XXX If we want to use interfaces in a more placeful way, we can provide
  * cloning ang merging to them. Since we don't really use them this way,
@@ -332,12 +377,18 @@
  */
 
 this.cleanRoomSetUp = function(suite) {
-    this._saved_interfaces = this._interfaces;
+    this._saved_global = this.global;
     // now create interfaces
-    this._createInterfaces();
+    this._createGlobalInterfaces();
 };
+this.cleanRoomFinalize = function(suite) {
+    // Need to finalize these interfaces
+    this.global.get('events', this.PluginMethodDescriptor).finalize({});
+    this.global.get('binditerations', 
this.BindIterationDescriptor).finalize({});
+};
+
 this.cleanRoomTearDown = function(suite) {
-    this._interfaces = this._saved_interfaces;
+    this.global = this.saved_global;
 };
 
 }(); /* END CLOSURE kukit.interfaces */

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kssparser.js  
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kssparser.js  
Tue Dec 25 12:58:42 2007
@@ -810,7 +810,7 @@
     // XXX The interfaces for the selector can be taken from a given interface
     // registry. We use kukit.interfaces now which will make it operate on
     // the global registry.
-    var interfaces = kukit.interfaces._interfaces;
+    var interfaces = kukit.interfaces.global;
     // Protect the error for better logging
 ;;; try {
         this.kssSelector = new kukit.rd.KssSelector(isEvent, css, origName,

Modified: kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kukit.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kukit.js      
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/kukit.js      
Tue Dec 25 12:58:42 2007
@@ -234,9 +234,6 @@
     this.binderInfoRegistry.processBindingEvents();
 };
 
-
-
-
 ku.Engine.prototype.initializeRules = function() {
     if (window.kukitRulesInitializing || window.kukitRulesInitialized) {
         // Refuse to initialize a second time.
@@ -245,10 +242,10 @@
     }
 ;;; kukit.log('Initializing interfaces.');
     // We finalize the core interface.
-    var klass = function() {};
-    kukit.interfaces.get('core').finalize(klass);
-    var obj = new klass();
-    this.coreinterface = obj
+    var interfaces = kukit.interfaces.global;
+    interfaces.get('core', 
kukit.interfaces.ServiceMethodDescriptor).finalize({});
+    interfaces.get('events', kukit.interfaces.PluginDescriptor).finalize({});
+    interfaces.get('binditerations', 
kukit.interfaces.BindIterationDescriptor).finalize({});
 ;;; kukit.log('Initializing kinetic stylesheets.');
     // Succesful initialization. At the moment the engine is kept
     // as a global variable, but this needs refinement in the future.

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/resourcedata.js
==============================================================================
--- 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/resourcedata.js   
    (original)
+++ 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/resourcedata.js   
    Tue Dec 25 12:58:42 2007
@@ -147,8 +147,8 @@
     // registry, so we cache this result.
     if (! this.bindIteration) {
         // Look up the binder class from the registry.
-        var events = this.interfaces.get('binditerations', 
kukit.interfaces.BindIterationDescriptor);
-        var entry = events.getMethodDescriptor(this.name);
+        var iterations = this.interfaces.get('binditerations', 
kukit.interfaces.BindIterationDescriptor);
+        var entry = iterations.getMethodDescriptor(this.name);
         if (! entry.config) {
 ;;;         kukit.E = 'undefined or unbindable event (no iteration found) [' + 
this.name + '].';
             throw kukit.err.pluginRegistryError(null, kukit.E);

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/service.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/service.js    
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/service.js    
Tue Dec 25 12:58:42 2007
@@ -3,7 +3,8 @@
 
 new function() {  // BEGIN CLOSURE service
 
-    var core = kukit.interfaces.getService('core');
+    var core = kukit.interfaces.global.get('core', 
kukit.interfaces.ServiceMethodDescriptor);
+
     core.getMethodDescriptor('cssQuery').define(['base2', 'cssQuery'], 
             // a parameter checker common for each implementation
             function(selector, inNodes) {

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_interfaces.js
==============================================================================
--- 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_interfaces.js
    (original)
+++ 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_interfaces.js
    Tue Dec 25 12:58:42 2007
@@ -31,6 +31,7 @@
 kukit.InterfacesTestCaseBase.prototype = new kukit.UtilsTestCaseBase();
 
 kukit.InterfacesTestCase = function() {
+    this.name = 'kukit.InterfacesTestCase';
     /*
      * Plugin interfaces
      */
@@ -54,8 +55,6 @@
     };
 
     this.testInterfaces = function() {
-        // We have a class, called C.
-        var C = function() {};
         // We can create a simple method descriptor for an interface we want.
         // The method descriptor is managing the method's registration state 
         called = [];
@@ -84,8 +83,8 @@
     };
 
     this.testFinalizeInterfaces = function() {
-        // We have a class, called C.
-        var C = function() {};
+        // We have a singleton, called s.
+        var s = {};
         // We can create a simple method descriptor for an interface we want.
         // The method descriptor is managing the method's registration state 
         called = [];
@@ -99,14 +98,13 @@
         called = [];
         //
         // At this point we are also ready to finalize the interface.
-        iface.finalize(C)
+        iface.finalize(s);
         // This calls finalize on all method descriptors.
         this.assertListEquals(called, ['FUNC fooMethod', 'FUNC barMethod']);
         called = [];
         // At the same time it also set up these on the class prototype.
-        var o = new C();
-        this.assert(o.fooMethod, 'FUNC fooMethod');
-        this.assert(o.barMethod, 'FUNC barMethod');
+        this.assertEquals(this.interfaces.dummytest.fooMethod, 'FUNC 
fooMethod');
+        this.assertEquals(this.interfaces.dummytest.barMethod, 'FUNC 
barMethod');
         // ... so if the descriptor sets methodFunc on the 
     };
 
@@ -148,8 +146,8 @@
      */
 
     this.testServiceInterfaces = function() {
-        // We have a class, called C.
-        var C = function() {};
+        // We have a singleton, called s.
+        var s = {};
         // Let's create a TestDummy interface.
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Define four methods, thie defines their necessity and preferred 
providers
@@ -175,20 +173,18 @@
                 function() {return function() {return 'fourth/extra';}});
         //
         // Now finalize it.
-        iface.finalize(C);
-        // Create an instance...
-        var o = new C();
+        iface.finalize(s);
         // We can call the methods on it,
-        this.assert(o.first(), 'first/core');
-        this.assert(o.second(), 'second/extra');
-        this.assert(o.third(), 'third/core');
-        this.assert(o.fourth(), 'fourth/extra');
+        this.assertEquals(this.interfaces.dummytest.first(), 'first/core');
+        this.assertEquals(this.interfaces.dummytest.second(), 'second/extra');
+        this.assertEquals(this.interfaces.dummytest.third(), 'third/core');
+        this.assertEquals(this.interfaces.dummytest.fourth(), 'fourth/extra');
     };
 
     this.testChecker = function() {
         // Test with a checker function.
-        // We have a class, called C.
-        var C = function() {};
+        // We have a singleton, called s.
+        var s = {};
         // Let's create a TestDummy interface.
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // and a counter for the checker
@@ -206,19 +202,18 @@
                 function() {return function() {return 'first/extra';}});
         //
         // Now finalize it.
-        iface.finalize(C);
-        var o = new C();
+        iface.finalize(s);
         // call it
-        this.assert(o.first(), 'first/core');
+        this.assertEquals(this.interfaces.dummytest.first(), 'first/core');
         // Check that the checker has been called.
-        this.assert(checker_counter, 1);
+        this.assertEquals(checker_counter, 1);
     };
 
     this.testReverseOrder = function() {
         // Method creation also works in reverse order:
         // a plugin first provides a method that another plugin later defines.
-        // We have a class, called C.
-        var C = function() {};
+        // We have a singleton, called s.
+        var s = {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Provide the method first
         iface.getMethodDescriptor('first').provide('corelib', '1.1', 
@@ -226,17 +221,14 @@
         // Define the method later
         iface.getMethodDescriptor('first').define(['corelib', 'extralib']);
         // Now finalize it.
-        var C = function() {};
-        iface.finalize(C);
-        // Create an instance...
-        var o = new C();
+        iface.finalize(s);
         // We can call the methods on it,
-        this.assert(o.first(), 'first/core');
+        this.assertEquals(this.interfaces.dummytest.first(), 'first/core');
     };
 
     this.testFinalizeTwice = function() {
         // An interface can only be finalized once.
-        var C = function() {};
+        var s = {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Provide the method first
         iface.getMethodDescriptor('first').provide('corelib', '1.1', 
@@ -244,33 +236,30 @@
         // Define the method later
         iface.getMethodDescriptor('first').define(['corelib', 'extralib']);
         // Now finalize it.
-        var C = function() {};
-        iface.finalize(C);
+        iface.finalize(s);
         // Finalize it again.
         this.assertThrows(function() {
-            iface.finalize(C);
+            iface.finalize(s);
             },
             Error);
     };
 
     this.testNotDefined = function() {
         // A method is provided but not defined.
-        var C = function() {};
+        var s = {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Provide the method first
         iface.getMethodDescriptor('first').provide('corelib', '1.1', 
                 function() {return function() {return 'first/core';}});
         // Now finalize it.
-        var C = function() {};
         this.assertThrows(function() {
-            iface.finalize(C);
+            iface.finalize(s);
             },
             Error)
     };
 
     this.testDoubleProvided = function() {
         // A method cannot be provided twice by the same provider.
-        var C = function() {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Provide the method first
         iface.getMethodDescriptor('first').provide('corelib', '1.1', 
@@ -285,7 +274,6 @@
 
     this.testDoubleDefined = function() {
         // A method can only be defined once.
-        var C = function() {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Define the method first
         iface.getMethodDescriptor('first').define(['corelib', 'extralib']);
@@ -298,7 +286,7 @@
 
     this.testNotProvided = function() {
         // No preferred provider can be found for a method.
-        var C = function() {};
+        var s = {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Define the method first
         iface.getMethodDescriptor('first').define(['corelib', 'extralib']);
@@ -306,9 +294,8 @@
         iface.getMethodDescriptor('first').provide('craplib', '1.1', 
                 function() {return function() {return 'first/crap';}});
         // Now finalize it.
-        var C = function() {};
         this.assertThrows(function() {
-            iface.finalize(C);
+            iface.finalize(s);
             },
             Error);
     };
@@ -330,7 +317,7 @@
             };
         }();
         // Now, for the interface part
-        var C = function() {};
+        var s = {};
         var iface = this.interfaces.get('dummytest', 
kukit.interfaces.ServiceMethodDescriptor);
         // Define the method with loader and fallback script
         iface.getMethodDescriptor('first').define(['corelib', 'extralib'], 
null, '++resource++one');
@@ -343,22 +330,21 @@
         iface.getMethodDescriptor('third').provide('extralib', '1.1', 
                 function() {return function() {return 'third/extra';}});
         // Now finalize it. It goes without error.
-        iface.finalize(C, loader);
+        iface.finalize(s, loader);
         // We see the contents of the loader. Third is not in there.
         this.assertListEquals(loader.loaded, ['++resource++one', 
'++resource++two'], 'Loaded contents differs.');
         // Third is actually working.
-        var o = new C();
-        this.assert(o.third(), 'third/extra');
+        this.assertEquals(this.interfaces.dummytest.third(), 'third/extra');
         // First and second are undefined.
-        this.assert(typeof(o.first), 'undefined');
-        this.assert(typeof(o.second), 'undefined');
+        this.assertEquals(typeof(this.interfaces.dummytest.first), 
'undefined');
+        this.assertEquals(typeof(this.interfaces.dummytest.second), 
'undefined');
         // Now the loader can go to load the needed files...
         // then it is supposed to re-finalize with and without a loader. Check 
if this is possible:
-        iface.finalize(C, loader);
+        iface.finalize(s, loader);
         // If we re-finalize without a loader, and the sources are still not 
loaded,
         // we get an error:
         this.assertThrows(function() {
-            iface.finalize(C);
+            iface.finalize(s);
             },
             Error);
     };
@@ -377,10 +363,8 @@
         this.bind = function(oper) {};
     };
     this.testPluginInterfaces = function() {
-        // We have a class, called C.
-        var C = function() {};
         // Let's create a TestDummy interface.
-        var events = this.interfaces.get('dummyevent', 
kukit.interfaces.PluginMethodDescriptor);
+        var events = this.interfaces.get('dummyevents', 
kukit.interfaces.PluginMethodDescriptor);
         var binditerations = this.interfaces.get('dummybinditerations', 
kukit.interfaces.BindIterationDescriptor);
         // somewhere else, core registers the methods:
         events.getMethodDescriptor('click').register({
@@ -418,19 +402,17 @@
             bindMethodName: 'bind'});
         //
         // Now finalize it.
-        events.finalize(C);
-        binditerations.finalize(C);
-        // Create an instance...
-        var o = new C();
+        events.finalize({});
+        binditerations.finalize({});
         // We can call the methods on it,
-        //this.assert(o.click.binderMethodName, 'bind');
-        //this.assert(o.keydown.binderMethodName, 'bind');
-        //this.assert(o.timeout.binderMethodName, 'bind');
+        this.assertEquals(this.interfaces.dummyevents.click.defaultMethodName, 
null);
+        
this.assertEquals(this.interfaces.dummyevents.keydown.defaultMethodName, null);
+        
this.assertEquals(this.interfaces.dummyevents.timeout.defaultMethodName, null);
+        
this.assertEquals(this.interfaces.dummybinditerations.timeout.iterName, 'Each');
     };
 
     this.testPluginNoDoubleReg = function() {
         // No double registration for test plugins.
-        var C = function() {};
         // Let's create a TestDummy interface.
         var events = this.interfaces.get('dummyevents', 
kukit.interfaces.PluginMethodDescriptor);
         // somewhere a plugin registers something:
@@ -454,7 +436,6 @@
 
     this.testBindIterationNoDoubleReg = function() {
         // No double registration for test plugins.
-        var C = function() {};
         // Let's create a TestDummy interface.
         var iface = this.interfaces.get('dummybinditeration', 
kukit.interfaces.BindIterationDescriptor);
         // somewhere else, core registers the methods:

Modified: 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_kssparser.js
==============================================================================
--- 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_kssparser.js 
    (original)
+++ 
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_kssparser.js 
    Tue Dec 25 12:58:42 2007
@@ -41,6 +41,9 @@
             kukit.pl.NativeEventBinder, null, null);
         // XXX the tests test at numerous occasion a non-existent
         // event, so be careful when you add a new one.
+        //
+        // finalize the interfaces we just set up
+        kukit.interfaces.cleanRoomFinalize(this);
     };
 
     this.tearDown = function() {
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to