• 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: change a value for a core data attribute programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change a value for a core data attribute programatically


  • Subject: Re: change a value for a core data attribute programatically
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 21 Jun 2005 13:45:00 -0700


On Jun 21, 2005, at 1:30 PM, J. Atwood wrote:

How do I change a value for a core data attribute programatically?

By default, using key-value coding:
<http://developer.apple.com/documentation/Cocoa/Conceptual/ CoreData/Articles/cdUsingMOs.html#//apple_ref/doc/uid/TP40001803-212651>



Assume a very simple core data application (i.e. I have a NSArrayController for all my entities and data is bound to tables via the NSArrayControllers, like the simple Cocoa Dev Central "BlogDemo" example.
My first thought was to do this in MyController: [CustomerArrayController valueForKey:@"name"].
But that yields an error: [<NSArrayController 0x160ec10> valueForUndefinedKey:]: this class is not key value coding- compliant for the key name.


You're sending a message to the array controller, not the managed object...

[[CustomerArrayController selection] valueForKey:@"name"]

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: 
 >change a value for a core data attribute programatically (From: "J. Atwood" <email@hidden>)

  • Prev by Date: Re: What is TRUEPREDICATE
  • Next by Date: Re: NSOutlineView not always showing "expand triangle"
  • Previous by thread: change a value for a core data attribute programatically
  • Next by thread: CoreData/Bindings and NSComboBox
  • Index(es):
    • Date
    • Thread