> On 13 Mar 2015, at 2:10 pm, Patrick J. Collins > <[email protected]> wrote: > > am a little confused with the documentation for NSTableViews... I assume > this is the method that one uses to set the "headers" of the table? > > - (void)tableView:(NSTableView *)tableView setObjectValue:(id)object > forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row; > > That's what I am looking to do, but I don't get how I specify how many > columns there are in the table? > > I have everything else in my table setup properly, I am just trying to figure > out how to set the header/column names. >
The method you mention is part of NSTableViewDataSource protocol. It is used to populate the table content, not the headers. Normally you just set up the column titles in IB. The titles are actually the tableColumn.headerCell.stringValue property, displayed in a NSTableHeaderView. If you are setting these programmatically, you should probably do tat as part of the table controller's setup, not every time the dataSource method is called (which is at least once per row). --Graham _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
