* Edit *
Should've RTM, I see now that .extend() returns the extended object, not the result of .create(). Works as expected if I don't chain the two methods.
Love the minimal approach Stapes takes to MVC, but I'm struggling with events. Seems to me that module.create() should copy event handlers that have been set on the template object. E.G.
module = Stapes.create().extend();
module.on("change:name", function() {console.log(this.get('name'));});
module.set("name", "foo"); // console reads "foo"
new_module = module.create();
new_module.set("name", "bar"); // to my mind, this should trigger the "change:name" event set above
Without a proper constructor, it's a bit onerous to add the events manually after an object is generated using .create()
* Edit * Should've RTM, I see now that .extend() returns the extended object, not the result of .create(). Works as expected if I don't chain the two methods.
Love the minimal approach Stapes takes to MVC, but I'm struggling with events. Seems to me that module.create() should copy event handlers that have been set on the template object. E.G.
Without a proper constructor, it's a bit onerous to add the events manually after an object is generated using .create()