Author: reebalazs
Date: Sat Dec 29 11:54:27 2007
New Revision: 50169
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/more_selectors.js
Log:
Demonstrate the use of registry by implementing Godefroid's improvement to the
more_selectors demo, from finish-closures
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/more_selectors.js
==============================================================================
---
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/more_selectors.js
(original)
+++
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/more_selectors.js
Sat Dec 29 11:54:27 2007
@@ -14,9 +14,17 @@
// overwrite countsomuch
this.countsomuch = oper.parms.count;
this.count = this.countsomuch;
- // Just bind the event via the native event binder
+ // Just bind the event via the native click event binder
oper.parms = {};
- kukit.pl.NativeEventBinder.prototype.__bind__(oper, 'click');
+ // Bind the event by looking up the binder class from the registry
+ //
+ // This __bind__ method offers an additional parameter to overwrite
+ // the name of the native browser event to bind.
+ // (Oper would fetch "annoyclicker-click" from the kssSelector,
+ // and this is used for info messages, but "click" will be
+ // bound physically.)
+ var click = kukit.interfaces.global.binditerations.click;
+ click.binderClass.prototype.__bind__(oper, 'click');
};
kukit.more_selectors.AnnoyClickerEvent.prototype.__default_click__ =
function(name, oper) {
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins