Just a little something I cooked up tonight after a few beers with Lee: ModelMediator = function (model) {   this.__onChanged__ = new Dictionary();   for (var key in model)   {     this.__defineSetter__(key, function (arg) { this.set(model, key, arg) });     this.__defineGetter__(key, function () { this.get(model, key) });     this.__onChanged__.set(key, new signals.Signal());   } } ModelMediator.prototype.get = function (model, key) { […]


Continue Reading


I sorely miss the Dictionary class from AS3, but wasn’t excited by what my Googles led to and figured I’d learn more by rolling my own. JavaScript Arrays can be used as a hash, but only with String or Numeric keys. This class lets you use any Object. A function, an Array, a class … […]


Continue Reading