• 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: Get reference to NSPersistentDocument from managed object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Get reference to NSPersistentDocument from managed object (From: Jesse Grosjean <email@hidden>)

  • Prev by Date: Trouble with Services
  • Next by Date: RE: NSTextView setRulerVisible: weirdness
  • Previous by thread: Get reference to NSPersistentDocument from managed object
  • Next by thread: Trouble with Services
  • Index(es):
    • Date
    • Thread