Skip to content

Instantly share code, notes, and snippets.

@ColinCampbell
Forked from joegaudet/gist:422891
Created June 2, 2010 19:58
Show Gist options
  • Save ColinCampbell/422897 to your computer and use it in GitHub Desktop.
Save ColinCampbell/422897 to your computer and use it in GitHub Desktop.
MyApp.MyObject = SC.Object.extend({
property: value;
computedProperty: function(){
return this.get('property') === "foo";
}.property('property'),
setProperty: function(value){
this.set('property',value);
}
});
MyApp.someObject = SC.Object.create({
object: MyApp.MyObject.create(),
iShouldFire: function(){
console.log('I should fire');
}.observes('.object.computedProperty')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment