Skip to content

Instantly share code, notes, and snippets.

@sevifives
Created May 1, 2012 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sevifives/2569886 to your computer and use it in GitHub Desktop.
Save sevifives/2569886 to your computer and use it in GitHub Desktop.
YourApp.someArrayController = SC.ArrayController.create({
someAction: function (x,y) {
var sel = this.getPath('selection');
}
});
// parent view code
something: SC.ListView.extend({
contentBinding: 'YourApp.someArrayController.content',
selectionBinding: SC.Binding.from('YourApp.someArrayController.selection').single(),
}),
someButton: SC.ButtonView.extend({
action:'someAction',
target: YourApp.someArrayController
})
// end parent view code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment