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: Ryan Britton <email@hidden>
- Date: Tue, 6 Sep 2005 07:51:05 -0700
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