Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing the underlying managed object, from a controller




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.