On Fri, May 23, 2008 at 1:22 PM, john darnell
<[EMAIL PROTECTED]> 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 protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]