• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArrayController and table view : how to bind selection ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSArrayController and table view : how to bind selection ?
      • From: mmalcolm crawford <email@hidden>
References: 
 >NSArrayController and table view : how to bind selection ? (From: Eric Morand <email@hidden>)
 >Re: NSArrayController and table view : how to bind selection ? (From: Ryan Britton <email@hidden>)

  • Prev by Date: Re: Newbie problem
  • Next by Date: Re: Core Data and NSTreeController Editing Problem.
  • Previous by thread: Re: NSArrayController and table view : how to bind selection ?
  • Next by thread: Re: NSArrayController and table view : how to bind selection ?
  • Index(es):
    • Date
    • Thread