• 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: Programmatically get treecontroller selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically get treecontroller selection


  • Subject: Re: Programmatically get treecontroller selection
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 20 May 2008 10:18:10 -0700


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Programmatically get treecontroller selection (From: Steven Hamilton <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Jonathan Dann <email@hidden>)
 >Re: Programmatically get treecontroller selection (From: Steven Hamilton <email@hidden>)

  • Prev by Date: Re: Localization and plural rules revisited
  • Next by Date: [NSMutableParagraphStyle setTighteningFactorForTruncation:] clarification
  • Previous by thread: Re: Programmatically get treecontroller selection
  • Next by thread: Re: Programmatically get treecontroller selection
  • Index(es):
    • Date
    • Thread