Closed rykov closed 12 years ago
You are right, and I will have a look at that. It is only broken for observers you define during creation, so this will work:
var A = SC.Object.extend({
name: null,
obs: function() { SC.Logger.info("A!!!"); }.observes('name')
});
var B = SC.Resource.define({
url: '/b', schema: { name: String }
}).reopen({
obs: function() { SC.Logger.info("B!!!"); }.observes('name')
});
var a = A.create({});
var b = B.create({});
a.set('name', 'Foo');
b.set('name', 'Bar');
Thanks for checking it out. I'll give that a shot.
Should be good now
I see that SC.Resource is an extension of SC.Object, however, it doesn't look like it's respecting observers. Is this by design?
As a demo, here is some test code:
This code produces the following output:
The observer in the SC.Resource is not fired.