• 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: Mike Rossetti <email@hidden>
  • Date: Fri, 18 Apr 2008 09:50:40 -0600

Hah! I believe Paul and Jens have identified the problem! Yes, I am using [[Tip alloc] init]. I'll rework that portion of the code and ping back later confirmating the good news.

Thanks guys!

Mike

On Apr 17, 2008, at 11:13 PM, Paul Goracke wrote:
[snip]
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.


On Apr 18, 2008, at 12:21 AM, Jens Alfke wrote:
[snip]
My guess would be that you're not instantiating the object properly. NSManagedObject does some very, very weird stuff behind the scenes, including swizzling in fake superclasses. Accordingly, you have to let the CoreData factory methods instantiate managed objects: just calling alloc+init won't work.

_______________________________________________

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: 
 >@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>)
 >Re: @dynamic and Programmatic Access to Setters (From: Paul Goracke <email@hidden>)

  • Prev by Date: setTextContainerInset with different values for left and right
  • Next by Date: Re: Mounting AFP Volume using Cocoa
  • Previous by thread: Re: @dynamic and Programmatic Access to Setters
  • Next by thread: Re: @dynamic and Programmatic Access to Setters
  • Index(es):
    • Date
    • Thread