Re: NSTableView identify problem
Re: NSTableView identify problem
- Subject: Re: NSTableView identify problem
- From: Scott Anguish <email@hidden>
- Date: Fri, 10 Jan 2003 16:38:32 -0500
On Friday, January 10, 2003, at 02:15 PM, Volker Bublitz wrote:
hi,
i'm using one class as a data source for four NSTableViews ... i set
the NSTableColumn of the header to a different name and identifier.
when the method
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)row;
is triggered i need to know which NSTableView aTableView really is..
how can i access information about the title or another identifier for
NSTableViews?
i know i can get the NSTableHeaderView - but how can i get the header
NSTableColumn to check its identifier? or is there another way?
I'd suggest keeping the instances of each table row in variables, and
then you can just compare the aTableView instance with the saved values.
So connect the individual tables in IB to outlets
NSTableView *namesTableView;
NSTableView *itemsTableView;
NSTableView *grogsTableView;
NSTableView *grogsDetailsTableView;
and then just compare in your code
if ([aTableView isEqual:namesTableView]) {
do something;
}
etc..
Or... you could set tags on the different NSTableViews in Interface
Builder, and then compare the tags...
#define NamesTableTag 1
if ([aTableView tag] == NamesTableTag) {
do something;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.