Skip to content

Instantly share code, notes, and snippets.

@tim-evans
Created June 3, 2011 13:23
Show Gist options
  • Save tim-evans/1006330 to your computer and use it in GitHub Desktop.
Save tim-evans/1006330 to your computer and use it in GitHub Desktop.
SC.ContainerView bug
MyApp = {};
MyApp.ContainerView = SC.ContainerView.extend({
nowShowing: 'MyApp.GreetingView',
init: function () {
var ret = arguments.callee.base.apply(this, arguments);
// I need this line ------------.
// to have `nowShowing` update v
// this.notifyPropertyChange('nowShowing');
return ret;
}
});
MyApp.GreetingView = SC.LabelView.extend({
value: 'Well, hi there!'
});
MyApp.mainPane = SC.MainPane.create();
MyApp.mainPane.appendChild(MyApp.ContainerView.create());
MyApp.mainPane.append();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment