• 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: Core Data - awakeFromInsert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data - awakeFromInsert


  • Subject: Re: Core Data - awakeFromInsert
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 4 Oct 2005 18:04:34 -0700


On Oct 4, 2005, at 4:43 PM, Jim Murry wrote:

I am trying to implement defaults by creating a core data object to hold these defaults.

It's not clear why you're trying to do this (in this way)...

This way they do not reset to zero when the program is run from a different user or a different machine as long as they have access to the same core data file.

... you can establish "factory settings" (NSRegistrationDomain) for user defaults much more easily (see <http://developer.apple.com/ documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/ NSUserDefaults.html#//apple_ref/doc/uid/20000318-CIHDDCDB>).



What are you actually trying to achieve?


[masterRecord willChangeValueForKey: @"recordID"];
[masterRecord setPrimitiveValue:[NSNumber numberWithLongLong: (value + 1)] forKey:@"recordID"];
[masterRecord didChangeValueForKey: @"recordID"];
[self setPrimitiveValue:[NSNumber numberWithLongLong:(value)] forKey:@"recordID"];


Don't do this!
Either use the standard KVO-compliant accessors or use the primitive accessors. It's not clear what you're trying to achieve doing this, or why.


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


  • Follow-Ups:
    • Re: Core Data - awakeFromInsert
      • From: Jim Murry <email@hidden>
References: 
 >Core Data - awakeFromInsert (From: Jim Murry <email@hidden>)

  • Prev by Date: Re: Reading data from the pipe in AuthorizationExecuteWithPrivileges() ??
  • Next by Date: Re: Reading data from the pipe in AuthorizationExecuteWithPrivileges() ??
  • Previous by thread: Core Data - awakeFromInsert
  • Next by thread: Re: Core Data - awakeFromInsert
  • Index(es):
    • Date
    • Thread