Re: Name of NSTableView
Re: Name of NSTableView
- Subject: Re: Name of NSTableView
- From: "Adam Gerson" <email@hidden>
- Date: Wed, 2 Apr 2008 20:41:33 -0400
All good ideas from Andy. I sometimes get arround this issue by using
the "tag" in IB. It has to be an int so I define
#define TABLE1 1
#define TABLE2 2
#define TABLE3 3
Then you can get a reference to your table with
if ([tableView tag] == TABLE3)
{
//code
}
On Wed, Apr 2, 2008 at 6:07 PM, Jens Alfke <email@hidden> wrote:
>
> On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote:
>
> >>> How would I get the name of a table view? I am trying to make all
> >>> of my tables use one class for the data source so I can make my
> >>> code more smaller.
>
> Why does your code need to be smaller? How big is it? This sounds like
> something that would really complicate the code and make it harder to
> read. The computer's disk space and RAM are less important [within
> limits!] than your development and coding time.
>
> In any case, I don't recommend trying to put special cases in your
> code that looks at some identifier of the table. Instead, subclass a
> base class.
>
>
> > I did that before but I can't do shouldSelectRow with that which I
> > need for filling out fields once a row is selected.
>
> I don't understand...
>
> —Jens
> _______________________________________________
>
> 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
>
_______________________________________________
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