RE: NSTableView
RE: NSTableView
- Subject: RE: NSTableView
- From: "john darnell" <email@hidden>
- Date: Fri, 23 May 2008 16:14:16 -0500
- Thread-topic: NSTableView
Got it! Thank you!
John
-----Original Message-----
From: Shawn Erickson [mailto:email@hidden]
Sent: Friday, May 23, 2008 3:38 PM
To: john darnell
Cc: email@hidden
Subject: Re: NSTableView
On Fri, May 23, 2008 at 1:22 PM, john darnell
<email@hidden> 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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden