Re: figuring out which TableView I am?
Re: figuring out which TableView I am?
- Subject: Re: figuring out which TableView I am?
- From: "Adam R. Maxwell" <email@hidden>
- Date: Mon, 27 Apr 2009 07:42:43 -0700
On Apr 27, 2009, at 2:10 AM, WT wrote:
On Apr 25, 2009, at 6:47 PM, David Scheidt wrote:
I've got a sub-class of NSTableView. I have windows that have more
than one instance of this TableView in them, which need to behave
slightly differently, based on which one they are.
The way I understood his question, this is a problem of
*identifying* instances. At some point or points in his code, he's
got a pointer to an instance of his subclass of NSTableView and
needs to be able to determine which of several instances that is. I
still maintain that if these instances have different tag values then
My understanding wants to do this from a tableview subclass, though:
switch([self tag]) {
case 1:
return ...
case 2:
return ...
}
...so the tag is truly being used as a container for a property, which
it doesn't sound like you intended? I don't think using tags from a
controller class is a bad solution, although my own preference would
be to have something like Jon/Mike/Jim suggested. Using the tag from
the tableview subclass seems like a poor design, IMO, and not easy to
maintain or extend.
--
Adam
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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