Author: reebalazs
Date: Tue Dec 25 12:58:46 2007
New Revision: 50078
Modified:
kukit/kukit.js/branch/ree-service-layer-and-refactoring/ (props changed)
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/resourcedata.js
kukit/kukit.js/branch/ree-service-layer-and-refactoring/tests/test_interfaces.js
Log:
Small name changes
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:46 2007
@@ -39,8 +39,11 @@
*
* XXX EventRegistry becomes pure BBB, when the new javascript docstring
registry
* is implemented.
+*
*/
var _EventRegistry = function () {
+ // XXX There is no actual registry here any more, just
+ // emulating the old methods with the interfaces registry.
};
/* there are the actual registration methods, to be called from plugins */
@@ -79,7 +82,8 @@
});
}
// Register the bind iteration
- //this._registerEventSet(namespace, eventNames, iterName, bindMethodName);
+ // This will specify the set of events that will be bound together,
+ // with the specified iterator
var binditerations = kukit.interfaces.global.get('binditerations',
kukit.interfaces.BindIterationDescriptor);
binditerations.getMethodDescriptor('').register({
namespace: namespace,
@@ -90,23 +94,6 @@
};
-// XXX This method should be deprc'd and from where it's called,
-// the finalized class's properties should be accessed
-_EventRegistry.prototype.get = function(namespace, eventName) {
- //var key = this._getKey(namespace, eventName);
- if (namespace) {
- eventName = namespace + '-' + eventName;
- }
- // var entry = this.content[key];
- var events = kukit.interfaces.global.get('events',
kukit.interfaces.PluginMethodDescriptor);
- var entry = events.getMethodDescriptor(eventName)
- if (! entry.config) {
-;;; kukit.E = 'Error : undefined event [' + eventName + '].';
- throw new Error(kukit.E);
- }
- return entry.config;
-};
-
kukit.eventsGlobalRegistry = new _EventRegistry();
/* XXX deprecated methods, to be removed asap */
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:46 2007
@@ -127,8 +127,6 @@
// finalize the functions and store them on the singleton
singleton[methodName] = methodDescriptor.finalize(loader);
});
- // 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.
@@ -147,7 +145,7 @@
}; /* end InterfaceDescriptor */
-this.Interfaces = function() {
+this.NamedInterfaces = function() {
this.registry = {};
@@ -166,7 +164,7 @@
return interfaceDescriptor;
};
-}; /* end Interfaces */
+}; /* end NamedInterfaces */
/*
* KSS service layer registry
@@ -361,7 +359,7 @@
this._createGlobalInterfaces = function() {
// create singleton for interfaces
- this.global = new this.Interfaces();
+ this.global = new this.NamedInterfaces();
};
this._createGlobalInterfaces();
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:46 2007
@@ -105,17 +105,11 @@
// Now we check the plugin part of the registry: this may not be
// necessary but this way we reject an event which has the binder
// set up, but has no actual event information.
-;;; // We wrap all errors as pluginRegistryError.
-;;; try {
- // XXX TODO cicrumvent the get
- kukit.eventsGlobalRegistry.get(
- null, this.name);
-;;; } catch(e) {
-;;; if (! e.name != 'PluginRegistryError') {
-;;; kukit.E = 'undefined event [' + this.name + '].';
-;;; throw kukit.err.pluginRegistryError(e, kukit.E);
-;;; }
-;;; }
+ var events = this.interfaces.events[this.name];
+ if (typeof(events) == 'undefined') {
+;;; kukit.E = 'Error : undefined event [' + this.name + '].';
+ throw kukit.err.pluginRegistryError(null, kukit.E);
+ }
};
kukit.rd.KssSelector.prototype.prepareId = function() {
@@ -147,14 +141,11 @@
// registry, so we cache this result.
if (! this.bindIteration) {
// Look up the binder class from the registry.
- var iterations = this.interfaces.get('binditerations',
kukit.interfaces.BindIterationDescriptor);
- var entry = iterations.getMethodDescriptor(this.name);
- if (! entry.config) {
+ this.bindIteration = this.interfaces.binditerations[this.name];
+ if (typeof(this.bindIteration) == 'undefined') {
;;; kukit.E = 'undefined or unbindable event (no iteration found) [' +
this.name + '].';
throw kukit.err.pluginRegistryError(null, kukit.E);
}
- // cache the binder class
- this.bindIteration = entry.config;
}
return this.bindIteration;
};
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:46 2007
@@ -25,7 +25,7 @@
this.setUp = function() {
// work with our own object, not interfering
// kukit.interfaces
- this.interfaces = new kukit.interfaces.Interfaces();
+ this.interfaces = new kukit.interfaces.NamedInterfaces();
};
}; /* end InterfacesTestCase */
kukit.InterfacesTestCaseBase.prototype = new kukit.UtilsTestCaseBase();
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins