• 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: Accessing the underlying managed object, from a controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing the underlying managed object, from a controller


  • Subject: Re: Accessing the underlying managed object, from a controller
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 2 Apr 2006 12:13:16 -0700


On Apr 2, 2006, at 9:45 AM, Neil Clayton wrote:

Ideally, I'm looking for some kind of row change event (which I don't see on NSTableView,


tableViewSelectionDidChange: Informs the delegate that the NSTableView’s selection has changed.

Also: <http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSTableView.html#//apple_ref/c/ data/NSTableViewSelectionDidChangeNotification>.


nor can seem to find some event like this in the bindings or core data docs)

It's not going to be in the Core Data documentation. Selections in the user interface have nothing to do with Core Data.
If you're using bindings, then you should be looking at the array controller:


<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSArrayController.html#// apple_ref/occ/instm/NSArrayController/selectionIndexes>

Note: "This property is observable using key-value observing." ...


What id like to do, is respond appropriately when a new row (a preset) is selected in the table. I'd like to get hold of the Preset.settings instance, and 'apply' it to the environment.
- which allows me to pass the Presets Array controller selection property as the currently selected object. Then, I'd be able to do something like: [...]


It's not clear what you're trying to achieve -- why are the bindings for the Settings object controller etc. relevant? It seems like all you want it to get the currently-selected object from the array controller when the table view selection changes? An example of retrieving the current selection is illustrated here:

<http://developer.apple.com/documentation/Cocoa/Conceptual/ NSPersistentDocumentTutorial/05_CopyAndPaste/ chapter_6_section_3.html#//apple_ref/doc/uid/TP40002833- DontLinkElementID_38>

mmalc

_______________________________________________
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


References: 
 >Accessing the underlying managed object, from a controller (From: Neil Clayton <email@hidden>)

  • Prev by Date: Re: Deletes Object on Remove option
  • Next by Date: Re: Core Data: How do you count records in a persistent store?
  • Previous by thread: Accessing the underlying managed object, from a controller
  • Next by thread: Apple-style expanding preferences panel
  • Index(es):
    • Date
    • Thread