Skip navigation.
 
mlRE: NSTableView
FROM : john darnell
DATE : Fri May 23 23:14:16 2008

Got it!  Thank you!

John

-----Original Message-----
From: Shawn Erickson [mailto:<email_removed>]
Sent: Friday, May 23, 2008 3:38 PM
To: john darnell
Cc: <email_removed>
Subject: Re: NSTableView

On Fri, May 23, 2008 at 1:22 PM, john darnell
<john.<email_removed>> wrote:

>  If I did have, say, three tables on a dialog, how would the code

know
> which function was for which table if that first element (or some

other
> element) is not differentiated?


An example of one way to do it follows...

@interface MyController : NSObject {
    IBOutlet NSTableView* tableView1; // connected to table 1 in your
nib
    IBOutlet NSTableView* tableView2; // connected to table 2 in your
nib
    IBOutlet NSTableView* tableView3; // connected to table 3 in your
nib
}
@end

@implementation MyController

- (id) tableView:(NSTableView*)aTableView ...blah...
{
    if (aTableView == tableView1) {
        ...
    } else if (aTableView == tableView2) {
        ...
    } else if (aTableView == tableView3) {
        ...
    }
}

@end

Related mailsAuthorDate
mlNSTableView john darnell May 23, 22:03
mlRe: NSTableView David Wilson May 23, 22:12
mlRe: NSTableView Erik Buck May 23, 22:17
mlRe: NSTableView Brian Stern May 23, 22:20
mlRE: NSTableView john darnell May 23, 22:22
mlRE: NSTableView john darnell May 23, 22:35
mlRe: NSTableView Andrew Farmer May 23, 22:35
mlRe: NSTableView Shawn Erickson May 23, 22:37
mlRE: NSTableView john darnell May 23, 23:14
mlRe: NSTableView Lynn Barton May 24, 02:22
mlRE: NSTableView john darnell May 26, 16:38