Re: NSArrayController: delay in setting selection, inserting item?
Re: NSArrayController: delay in setting selection, inserting item?
- Subject: Re: NSArrayController: delay in setting selection, inserting item?
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 26 Jun 2005 11:58:57 -0700
On Jun 26, 2005, at 11:38 AM, Joshua Scott Emmons wrote:
NSManagedObject *managedObject = [NSEntityDescription
insertNewObjectForEntityForName:@"MyEntity" inManagedObjectContext:
[self managedObjectContext]];
[managedObject setValue:[NSDate
dateWithNaturalLanguageString:@"now"] forKey:@"completed"];
[NSDate date] would be more efficient than using
dateWithNaturalLanguageString: (moreover the latter may not work if
the user's preferred language is something other than English...).
Do you want the completed attribute to be set for every new MyEntity
object, or is this a special case? If the former, then you should
override awakeFromInsert.
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSManagedObject.html#//apple_ref/doc/uid/
TP30001171-BBCJFJFC>
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