• 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
Need help setting up KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help setting up KVO


  • Subject: Need help setting up KVO
  • From: Yevgeniy Goldberg <email@hidden>
  • Date: Wed, 21 Mar 2007 19:59:54 -0500

Hello,
I need to be able to retrieve a Managed Object from a Managed Object Context in response to a new selection being made in my NSTableView
I use Core Data and bindings.
I have a fetch request with predicates in my model class.
I found a reference, stating that one way to accomplish what I need is to set up KVO for selectionIndexes change event.


The Question: Is this really the best way to fetch the data for the selected row?
If it is the best way, then where in my code should I add this:


[searchArrayController addObserver: self
                           forKeyPath: @"selectionIndexes"
                           options: NSKeyValueObservingOptionNew
                           context: NULL];
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Need help setting up KVO
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: How to add my cocoa app at system preferences others categary
  • Next by Date: QTKit and NSImage not playing nice
  • Previous by thread: Tabbing into & out of editable table
  • Next by thread: Re: Need help setting up KVO
  • Index(es):
    • Date
    • Thread