• 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: @dynamic and Programmatic Access to Setters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @dynamic and Programmatic Access to Setters


  • Subject: Re: @dynamic and Programmatic Access to Setters
  • From: Paul Goracke <email@hidden>
  • Date: Thu, 17 Apr 2008 22:13:46 -0700

On Apr 17, 2008, at 8:47 PM, Mike Rossetti wrote:

Yes, that's my understanding. But according to the comments I mentioned in my earlier message, Core Data provides the implementations. And clearly it does since I can edit, save and restore the document.

But you're doing all that via bindings, which uses KVC but doesn't require accessor methods. So "it works" does not imply that the accessors were synthesized.


I'm just missing the 'magic' that tells me how to set/get a property being managed by Core Data.

I think the problem is in your creation of the Tip NSManagedObject-- you can't simply call [[Tip alloc] init] and have it work. Create your object via "[[NSManagedObject alloc] initWithEntity:@"Tip" insertIntoManagedObjectContext:[self managedObjectContext]]" or "[NSEntityDescription entityForName:@"Tip" inManagedObjectContext: [self managedObjectContext]]" and it should work as expected.


I'm pretty sure the property accessors are being synthesized; you're just not creating an object that can be recognized as the proper type to determine whether it responds to that selector.

See <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html#//apple_ref/doc/uid/TP40001654-213474 > for further information.

pg

_______________________________________________

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


  • Follow-Ups:
    • Re: @dynamic and Programmatic Access to Setters
      • From: Mike Rossetti <email@hidden>
References: 
 >@dynamic and Programmatic Access to Setters (From: Mike Rossetti <email@hidden>)
 >Re: @dynamic and Programmatic Access to Setters (From: Jack Repenning <email@hidden>)
 >Re: @dynamic and Programmatic Access to Setters (From: Mike Rossetti <email@hidden>)

  • Prev by Date: Re: @dynamic and Programmatic Access to Setters
  • Next by Date: Re: Why is [nil aMessage] a no-op?
  • Previous by thread: Re: @dynamic and Programmatic Access to Setters
  • Next by thread: Re: @dynamic and Programmatic Access to Setters
  • Index(es):
    • Date
    • Thread