Skip to content

Instantly share code, notes, and snippets.

@primalmotion
Created May 14, 2010 21:56
Show Gist options
  • Select an option

  • Save primalmotion/401723 to your computer and use it in GitHub Desktop.

Select an option

Save primalmotion/401723 to your computer and use it in GitHub Desktop.
...
[_tableViewNetworks setUsesAlternatingRowBackgroundColors:YES];
[_tableViewNetworks setAutoresizingMask: CPViewWidthSizable | CPViewHeightSizable];
[_tableViewNetworks setAllowsColumnResizing:YES];
[_tableViewNetworks setAllowsEmptySelection:YES];
[_tableViewNetworks setTarget:self];
[_tableViewNetworks setDoubleAction:@selector(editNetwork:)];
[_tableViewNetworks setDataSource:_datasourceNetworks];
[_tableViewNetworks setDelegate:self];
...
var desc = [CPSortDescriptor sortDescriptorWithKey:@"networkName" ascending:YES];
var columNetworkName = [[CPTableColumn alloc] initWithIdentifier:@"networkName"];
[[columNetworkName headerView] setStringValue:@"Name"];
[columNetworkName setWidth:200];
[columNetworkName setSortDescriptorPrototype:desc];
...
[_tableViewNetworks addTableColumn:columNetworkName];
}
- (void)tableView:(CPTableView)aTableView sortDescriptorsDidChange:(CPArray)oldDescriptors
{
console.log("--------------YOUH");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment