Re: NSBrowserCell and objects
Re: NSBrowserCell and objects
- Subject: Re: NSBrowserCell and objects
- From: j o a r <email@hidden>
- Date: Sun, 19 Sep 2004 23:31:00 +0200
Don't forget that NSBrowserCell inherits from NSCell! Take a look at
"setRepresentedObject:".
j o a r
On 2004-09-19, at 22.38, J Tichenor wrote:
I want to include a pointer in the NSBrowserCell as I am setting it's
title, such than later, when examining the cell, I can refer back to
the original object it points to.
I thought using -setObjectValue and -objectValue would do the trick,
but to implement -setObjectValue I need to also implement copying
protocols in my custom classes, which I don't want to do -- I don't
want a copy of the object, but just a pointer to. I thought I might
override NSBrowserCell, adding a single variable and setter and getter
for it, but can't figure out how to use this custom class.
Is there something that I am missing? It seems strange that one can
set the title of a cell in the browser but not somehow pass along the
object the title is coming from, whether it's a file folder or branch
in a database. Anyone have any thoughts?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden