Re: Calling processPendingChanges from awakeFromInsert
Re: Calling processPendingChanges from awakeFromInsert
- Subject: Re: Calling processPendingChanges from awakeFromInsert
- From: Jim Correia <email@hidden>
- Date: Thu, 20 Sep 2007 17:20:10 -0400
On Sep 20, 2007, at 5:07 PM, Michael Burns wrote:
The performSelector bit was part of what I thought might have been
a solution to my problem. Here's what I'm really trying to do:
This is an NSPersistentDocument based application. Every time a
new document is created, an entity called a "Project" is created
which stores all sorts of global data relevant to that document.
The awakeFromInsert from below is for another NSManagedObject
("WBObject") which is created through cocoa bindings as I
explained. The "Project" entity has a to-many relationship called
"objects" and the "WBObject" entity has a to-one relationship
called "project". All I am trying to do is set up that
relationship when a new "WBObject" object is created.
Setting the initial values in -awakeFromInsert is a reasonable thing
to do. Why are you trying to disable undo registration though?
BTW, if there is really only ever one instance of Project in a
document, it seems odd to model a relationship between every WBObject
and the project; the modeled relationship doesn't appear to be
providing any new or useful information to the object graph.
Jim
_______________________________________________
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