• 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: Checking file modification dates in NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking file modification dates in NSDocument


  • Subject: Re: Checking file modification dates in NSDocument
  • From: "Jordan Krushen" <email@hidden>
  • Date: Fri, 28 Jul 2006 13:53:15 -0700

On 7/28/06, Sanford Selznick <email@hidden> wrote:

At 11:40 AM -0700 7/28/06, Jordan Krushen wrote:

>Then you're aware that all of the other work you're doing is
>ultimately for nothing, due to the inherent race condition between
>when you check for changes and when you commit the new file?

You are right, of course.  File Locking is the right solution.
Unfortunately it's a royal pain the butt.  And every app has to do it.

So what's the solution? Stop using NSDocument?

I haven't yet done this with Cocoa myself, but perhaps NSDistributedLock would be something to try:

<file:///Developer/ADC Reference Library/documentation/Cocoa/Reference/Foundation/Classes/NSDistributedLock_Class/Reference/Reference.html>

J.
_______________________________________________
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


  • Follow-Ups:
    • Re: Checking file modification dates in NSDocument
      • From: Sanford Selznick <email@hidden>
References: 
 >Re: Checking file modification dates in NSDocument (From: "Jordan Krushen" <email@hidden>)

  • Prev by Date: Re: Checking file modification dates in NSDocument
  • Next by Date: Re: Get Machine Type string
  • Previous by thread: Re: Checking file modification dates in NSDocument
  • Next by thread: Re: Checking file modification dates in NSDocument
  • Index(es):
    • Date
    • Thread