Author: reebalazs
Date: Tue Dec 25 12:59:23 2007
New Revision: 50089

Modified:
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/   (props changed)
   kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/resourcedata.js
Log:
Refactor the composition of merge id (composeMergeId)

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:59:23 2007
@@ -22,6 +22,17 @@
 kukit.rd = {};
 
 /*
+ * Function constructMergeId
+ *
+ * Puts together the unique merge id from the (event) nams
+ * and the bind key. The bind key can have any characters since
+ * it contains the id.
+ */
+kukit.rd.constructMergeId = function(name, bindKey) {
+    return name + '@' + bindKey;
+};
+
+/*
 *  class KssSelector
 */
 kukit.rd.KssSelector = function(isEvent, css, name, id, ppid, interfaces) {
@@ -167,7 +178,7 @@
         // Statically set.
         return this.mergeId;
     } else { 
-        return this.name + '@' + this.getBindKey(node);
+        return kukit.rd.constructMergeId(this.name, this.getBindKey(node));
     }
 };
 
@@ -880,8 +891,7 @@
     //
     // Generate its merge id from the bindkey and event name
     var bindKey = binder.__bindKey__;
-    // XXX TODO refactor this with kssSelector
-    var mergeId = name + '@' + bindKey;
+    var mergeId = kukit.rd.constructMergeId(name, bindKey);
     var mergedRule = dict[mergeId];
     if (typeof(mergedRule) == 'undefined') {
         // no error, just return null.
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to