Skip to content

Commit

Permalink
Remove SC.Binding's dependency on SC.Object
Browse files Browse the repository at this point in the history
  • Loading branch information
ebryn committed Oct 19, 2011
1 parent fca14be commit 48fac70
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions packages/sproutcore-runtime/lib/system/binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,29 @@ var OR_OPERATION = function(obj, left, right) {
@since SproutCore 1.0
*/
var Binding = SC.Object.extend({

var K = function() {};
var Binding = function(toPath, fromPath) {
var self;

if (this instanceof Binding) {
self = this;
} else {
self = new K();
}

/** @private */
_direction: 'fwd',
self._direction = 'fwd';

/** @private */
init: function(toPath, fromPath) {
this._from = fromPath;
this._to = toPath;
},
self._from = fromPath;
self._to = toPath;

return self;
};

K.prototype = Binding.prototype;

Binding.prototype = {
// ..........................................................
// CONFIG
//
Expand Down Expand Up @@ -678,7 +690,15 @@ var Binding = SC.Object.extend({
}
}

});
};

Binding.reopenClass = function(classMethods) {
for (var key in classMethods) {
if (typeof classMethods[key] === 'function') {
Binding[key] = classMethods[key];
}
}
};

Binding.reopenClass(/** @scope SC.Binding */ {

Expand Down

0 comments on commit 48fac70

Please sign in to comment.