On May 20, 2008, at 03:10, Steven Hamilton wrote:

I have an NSOutlineVIew bound to a NSTreeController in entity mode bound to an entity called "Account" which has a NSString called "name"

So the NSTreeController is set to entity mode and the entity name is "Account", yes? I re-phrased it like that because this information (on the attributes page of the IB inspector) is not actually a binding.

The binding (contentSet, presumably) is typically set to some property of File's Owner, but you don't say how this binding is set up. It might be (for example) an "accounts" property of a NSPersistentDocument, or it might be a property of your custom controller. So the questions are:

-- You didn't by any chance omit the contentSet or equivalent binding on the NSTreeController?

-- Does the object/property, the one that the NSTreeController is bound to, exist before the window is loaded and the NSTreeController created? You likely will need to execute a fetch in your document opening method (if you're using NSPersistentDocument) or otherwise before the window nib is loaded.

BTW, I notice that the "Cannot perform operation without a managed object context" error is logged *before* you log "default". The problem is not apparently anything to do with getting the selection in the code you posted, since it happens before you do that.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to