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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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]
