Re: Help with custom NSCell and Bindings in Table View
Re: Help with custom NSCell and Bindings in Table View
- Subject: Re: Help with custom NSCell and Bindings in Table View
- From: email@hidden
- Date: Mon, 6 Mar 2006 00:53:18 -0800
After reading this again, I think I misinterpreted.
On 平成 18/03/06, at 0:43, email@hidden wrote:
On 平成 18/03/05, at 16:36, Mike Abdullah wrote:
So can anyone tell me how to ask the NSArrayController to set the
objectValue to the one the user has just chosen?
I don't think you can, its not NSArraycontrollers'
responsibility............ but you could subclass NSCell to do so.
(Its a little hard to help if we don't know exactly what your cell
is doing though...)
You can make an outlet from the cell, and depending on what was
selected, if you want to manipulate another selection, then use
setSelectedObjects: of
the array controller you want to manipulate, I think thats
appropriate. (Though I'm not completely sure, because again I may be
misinterpreting)
IOW what you should be doing is manipulating a relationship in the
model object your cell is displaying.
So, another NSArrayController is dependent on that particular
relation, so it binds to that, the view/cell does not manipulate
the array controller directly.
If really you need to do that, then maybe adding an IBOutlet to the
cell, and connect the array controller to the cell you may be able
to manipulate it directly....
But, I think the first way is more standard.
Andre
email@hidden
_______________________________________________
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
Andre
email@hidden
_______________________________________________
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