Re: NSArrayController and table view : how to bind selection ?
Re: NSArrayController and table view : how to bind selection ?
- Subject: Re: NSArrayController and table view : how to bind selection ?
- From: Eric Morand <email@hidden>
- Date: Tue, 6 Sep 2005 18:39:06 +0200
The problem is that NSArrayController doesn't seem to have useful
bindings to get the selected object. I've tried to create an outlet
to my array controller and call "selection" method on it but it
returns a proxy object that is useless to me (I want the managed
object).
Le 6 sept. 05 à 16:51, Ryan Britton a écrit :
NSTableView has a binding called selectionIndexes. Just bind that
to the same key on your NSArrayController and the two selections
will be kept in sync. You can then call various methods on your
NSArrayController instance to get the selection information.
On Sep 6, 2005, at 7:01 AM, Eric Morand wrote:
Hi List !
I've been searching around the web for an answer to this question
and I didn't find anything so I assume I'm the only person having
problem understanding it, so please excuse me if this question
looks silly : how can I bind the current selected object of a
table view ?
Let me explain : I have a table view that allow the user to select
a Book by its name. I want the selected book to be automatically
bound to a variable named selectedBook. I just can't find how to
achieve this.
This is very easy to achieve with a pop up button, but I can't
find a way to achieve this with a table view. Since both can be
bound to the content of an array controller, I suppose the problem
comes from the table view and not from the array controller.
Of course, I could use the selectionDidChange delegate method and
it will be perfect but before this, I'd like to know if there is a
way to do this using only bindings.
Thanks,
Eric.
_______________________________________________
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
_______________________________________________
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