• 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: Advice on document handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice on document handling


  • Subject: Re: Advice on document handling
  • From: Graham Cox <email@hidden>
  • Date: Fri, 20 Jun 2014 12:58:11 +1000

On 20 Jun 2014, at 12:37 pm, John Brownie <email@hidden> wrote:

> OK, thank you for the pointers. After a lot of refactoring, I've got things working without deadlocks, and cleaned up various things on the way.
>
> However, the autosave is getting too expensive for the bundled document.

One strategy might to make it less expensive. How are you saving stuff? Archiving? Are you allowing it to save in the background?

> However, I haven't been able to find out how to determine if a particular object has changed since the version on disk. In particular, there is only one undo manager for the document, but there are several files that are managed by the document, and I can't see how to see what has changed.
>
> I must be missing something obvious, so would welcome someone pointing me in the right direction on this one.


Well, you might have to end up rolling your own solution to tracking which files have changed. You probably can't rely on NSUndoManager, that's not really its job, and in any case it's a very opaque object. Your document could certainly manage a list of URLs that it knows have changed, and this list could be maintained in some simple manner by your code as it works, in addition to any normal undo. It's for you to figure it out though, as it will depend entirely on what your document does and how it does it.

--Graham



_______________________________________________

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


  • Follow-Ups:
    • Re: Advice on document handling
      • From: John Brownie <email@hidden>
References: 
 >Advice on document handling (From: John Brownie <email@hidden>)
 >Re: Advice on document handling (From: Graham Cox <email@hidden>)
 >Re: Advice on document handling (From: John Brownie <email@hidden>)
 >Re: Advice on document handling (From: John Brownie <email@hidden>)

  • Prev by Date: Re: Advice on document handling
  • Next by Date: Re: Advice on document handling
  • Previous by thread: Re: Advice on document handling
  • Next by thread: Re: Advice on document handling
  • Index(es):
    • Date
    • Thread