Re: Table bindings to objects
Re: Table bindings to objects
- Subject: Re: Table bindings to objects
- From: Michael McCracken <email@hidden>
- Date: Tue, 19 Jul 2005 09:33:08 -0700
Sounds you need to make sure that the objects you are using are KVC
and KVO compatible. Google or Check the recent list archives for
references to the KV* documentation (look for messages from mmalcolm
crawford)
-mike
On 7/19/05, Jason Swain <email@hidden> wrote:
> I have a table column that is bound to an NSArrayController where the
> items are objects (i.e. not strings). I have not set a model key path
> to select a string value (e.g. the name method of my class). I then
> have an NSCell subclass that draws a representation of my object for
> each cell.
>
> I want the cell to be editable but this is not working. If I change
> the binding to point to a string rather than an object then editing
> does work, so I think I have narrowed it down to the fact that I am
> using an object for the cell data rather than a string. I have
> created the object class myself and have not implemented stringValue,
> objectValue etc. I was wondering if this was the problem? Should I be
> implementing some methods for conversion to/from a string for
> editing? Or am I going about this the wrong way, I'm just not sure
> how you are meant to structure something like this?
>
> Does anyone know how this should work?
>
>
> Jason
> _______________________________________________
> 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
>
--
Michael McCracken
UCSD CSE PhD Candidate
research: http://www.cse.ucsd.edu/~mmccrack/
misc: http://michael-mccracken.net/blog/
_______________________________________________
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