• 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: Tree controller bindings and @sum question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree controller bindings and @sum question


  • Subject: Re: Tree controller bindings and @sum question
  • From: "Ian G. Gillespie" <email@hidden>
  • Date: Sun, 29 May 2005 10:04:25 -0400

For the archives I found a solution to this. I created a new array controller in IB and bound it to my file's managedObjectContext (in my case, my file is a subclass of NSManagedDocument). I then bound the text field to the array for controller path "arrangedObjects" and model key path, "@sum.totalAmount". Still not sure how I could have bound the text field directly to the tree controller.


I have successfully setup a NSTreeController for use with an outline view using Core Data. I want to have a text field that sums the values in one of the table columns. I tried binding the text field to the tree controller's arrangedObjects with a key path of @sum.totalAmount. At run time, however, I get the error [<_NSControllerTreeProxy 0x4e8ce0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key @sum. Does this only work with an array controller and not a tree controller? If so, how would one go about binding a text field to sum the values from a column?


_______________________________________________ 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: 
 >Tree controller bindings and @sum question (From: "Ian G. Gillespie" <email@hidden>)

  • Prev by Date: Re: primitiveValueForKey Memory Management
  • Next by Date: Re: Accessing iTunes
  • Previous by thread: Tree controller bindings and @sum question
  • Next by thread: Saving via NSCoder/dataRepresentationOfType without the '...typedstream...' prefixes
  • Index(es):
    • Date
    • Thread