Re: Multiple NSTableView question
Re: Multiple NSTableView question
- Subject: Re: Multiple NSTableView question
- From: "Sven A. Schmidt" <email@hidden>
- Date: Thu, 21 Jun 2001 09:43:57 +0200
On Donnerstag, Juni 21, 2001, at 12:53 Uhr, Jason Brown wrote:
I keep reading that by evaluating the theTableView argument used in
- (int)numberOfRowsInTableView:(NSTable *)theTableView
and
- (id)tableView:(NSTableView *)theTableView
objectValueForTableColumn:(NSTableColumn *)theColumn
row:(int)rowIndex
you can distinguish which table view is invoking these methods, when
using more than one table view.
My question is this: Evaluate it against what?
In your controller object you probably keep outlets to the table views
you use. By testing
if ( [ myFirstView isEqualTo: theTableView ] ) { ... }
you can figure out where the message comes from. You can find
"isEqualTo" and the like in the NSComparisonMethods protocal description
in Foundation. There are useful string comparisons in there, too.
Sven