Skip to content

Instantly share code, notes, and snippets.

@enyo
Created June 10, 2010 14:36
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 enyo/433082 to your computer and use it in GitHub Desktop.
Save enyo/433082 to your computer and use it in GitHub Desktop.
// Setting the tags
var tagGroups = Inc.store.find(Inc.ALL_TAG_GROUPS_QUERY);
Inc.allTagGroupsController.set('content', tagGroups);
// The controller in question
Inc.editedTagGroupsController = SC.ArrayController.create(
SC.CollectionViewDelegate, // So we can add / delete rows
/** @scope Inc.editedTagGroupsController.prototype */ {
contentBinding: 'Inc.allTagGroupsController.arrangedObjects',
allowsMultipleSelection: NO,
etc....
// The list view
contentView: SC.ListView.design({
contentBinding: 'Inc.editedTagGroupsController.arrangedObjects',
selectionBinding: 'Inc.editedTagGroupsController.selection',
contentValueKey: "name",
canEditContent: YES,
canDeleteContent: YES,
rowHeight: 21
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment