Re: Get reference to NSPersistentDocument from managed object
Re: Get reference to NSPersistentDocument from managed object
- Subject: Re: Get reference to NSPersistentDocument from managed object
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 12 Jun 2005 10:03:51 -0700
On Jun 12, 2005, at 5:57 AM, Jesse Grosjean wrote:
Can anyone suggest a good way to allow managed objects to get a
reference to their NSPersistentDocument. I need to do this so that
I can implement object specifier methods for my managed objects for
applescript support.
Currently I'm doing this by creating a custom subclass of
NSManagedObjectContext with an instance variable that points to a
NSPersistentDocument. Then in my subclass of NSPersistentDocument I
create this custom managed object context and give it a reference
to the document...
It works, but there must be a cleaner way?
You should try to minimise the number of dependencies model objects
have on controllers and views. The approach you've taken is probably
already the "cleanest" option. Are you able to give more details
about your requirements?
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