Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 23 May 2008 13:37:45 -0700
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