RE: Can one class be a dataSource for multiple NSTableViews?
RE: Can one class be a dataSource for multiple NSTableViews?
- Subject: RE: Can one class be a dataSource for multiple NSTableViews?
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Thu, 20 Nov 2003 10:45:26 -0500
Of course! Just set up the appropriate conditionals in your code, e.g.,
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
if (aTableView == colorTable) return [colorArray count];
if (aTableView == nameTable) return [nameArray count];
return 0; \\ just in case
}
This assumes you have outlets to these tables in your datasource.
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Michael Rothwell
>
Sent: Thursday, November 20, 2003 1:57 AM
>
To: Cocoa
>
Subject: Can one class be a dataSource for multiple NSTableViews?
>
>
>
Can one class be a dataSource for multiple NSTableViews?
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.