• 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: NSDocument subclass, File Wrappers & Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument subclass, File Wrappers & Core Data


  • Subject: Re: NSDocument subclass, File Wrappers & Core Data
  • From: Matthew Johnson <email@hidden>
  • Date: Mon, 18 Dec 2006 17:36:40 -0600

There is no API to inform the persistent store coordinator if the file wrapper (and therefore the store) changes locations on disk while the document is open. Consequently, things that you would expect to work like NSDocument-style atomic saves and reacting to moving the file in Finder are not possible.

Features of NSDocument that assume an in-memory document certainly won't work in such a subclass but that is no reason to assume it isn't possible to create a subclass of NSDocument that works slightly differently. I have looked into it a bit and I believe there are some nuances that you need to take into account but it does seem that it would work as long as you take over all persistence (ex. disabling atomic and automatic saving).


The issue of having a file moved out from under you is really a separate issue. I'm sure it also exists with NSPersistentDocument and I really don't see a way around that for any CoreData document-based apps.

Matthew

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSDocument subclass, File Wrappers & Core Data (From: Matthew Johnson <email@hidden>)
 >Re: NSDocument subclass, File Wrappers & Core Data (From: mmalc crawford <email@hidden>)
 >Re: NSDocument subclass, File Wrappers & Core Data (From: Matthew Johnson <email@hidden>)
 >Re: NSDocument subclass, File Wrappers & Core Data (From: mmalc crawford <email@hidden>)
 >Re: NSDocument subclass, File Wrappers & Core Data (From: "I. Savant" <email@hidden>)
 >Re: NSDocument subclass, File Wrappers & Core Data (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: Using bindings to make an NSPopupButton to assign an array filter predicate
  • Next by Date: Re: Re: NSMatrix, NSImageCell and selection indicator
  • Previous by thread: Re: NSDocument subclass, File Wrappers & Core Data
  • Next by thread: NSScrollView in a child overlay window not receiving scrollWheel: events
  • Index(es):
    • Date
    • Thread