Author: gotcha
Date: Mon Dec 24 16:56:54 2007
New Revision: 50063
Modified:
kukit/kss.core/branch/finish-closures/kss/core/plugins/core/demo/more_selectors.js
Log:
event binder change to accomodate class closures for event binders
Modified:
kukit/kss.core/branch/finish-closures/kss/core/plugins/core/demo/more_selectors.js
==============================================================================
---
kukit/kss.core/branch/finish-closures/kss/core/plugins/core/demo/more_selectors.js
(original)
+++
kukit/kss.core/branch/finish-closures/kss/core/plugins/core/demo/more_selectors.js
Mon Dec 24 16:56:54 2007
@@ -3,9 +3,8 @@
kukit.more_selectors = {};
kukit.more_selectors.AnnoyClickerEvent = function() {
-};
-kukit.more_selectors.AnnoyClickerEvent.prototype.__bind_click__ =
function(name, func_to_bind, oper) {
+this.__bind_click__ = function(name, func_to_bind, oper) {
// validate and set parameters
oper.evaluateParameters([], {'count': '3'}, 'annoyClicker event binding');
oper.evalInt('count', 'annoyClicker event binding');
@@ -16,21 +15,24 @@
this.count = this.countsomuch;
// Just bind the event via the native event binder
oper.parms = {};
- kukit.pl.NativeEventBinder.prototype.__bind__('click', func_to_bind, oper);
+ var clickBinder =
kukit.eventsGlobalRegistry.getBinderClassByEventNamespace('', 'click');
+ clickBinder.prototype.__bind__('click', func_to_bind, oper);
};
-kukit.more_selectors.AnnoyClickerEvent.prototype.__default_click__ =
function(name, oper) {
+this.__default_click__ = function(name, oper) {
oper.evaluateParameters([], {}, 'annoyClicker event binding');
this.count -= 1;
if (this.count == 0) {
// Continue with the real action.
this.count = this.countsomuch;
- this.__continueEvent__('doit', oper.node, {});
+ this.continueEvent('doit', oper.node, {});
} else {
- this.__continueEvent__('annoy', oper.node, {});
+ this.continueEvent('annoy', oper.node, {});
}
};
+};
+
kukit.eventsGlobalRegistry.register('annoyclicker', 'click',
kukit.more_selectors.AnnoyClickerEvent, '__bind_click__', '__default_click__');
kukit.eventsGlobalRegistry.register('annoyclicker', 'annoy',
kukit.more_selectors.AnnoyClickerEvent, null, null);
kukit.eventsGlobalRegistry.register('annoyclicker', 'doit',
kukit.more_selectors.AnnoyClickerEvent, null, null);
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins