• 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: Saving an NSDocument safely
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving an NSDocument safely


  • Subject: Re: Saving an NSDocument safely
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Fri, 11 Jan 2008 14:16:02 -0800

On Friday, January 11, 2008, at 02:06PM, "Kyle Sluder" <email@hidden> wrote:
>On Jan 11, 2008 11:24 AM, Adam R. Maxwell <email@hidden> wrote:
>> Yes, the framework does this in -[NSDocument writeSafelyToURL:..].
>> Using FSExchangeObjects doesn't result in the problem the OP mentions,
>> but the temp file and destination file have to reside on the same
>> volume.  I had to write my own implementation of writeSafelyToURL:
>> yesterday since 10.5's safe saving is broken.
>
>Please do elaborate.  This is important to one of my projects, and I
>haven't experienced any issues with safe saving on 10.5.

http://www.cocoabuilder.com/search/archive/cocoa?words=FSPathReplaceObject

In our case, this appears related to extended attributes on AFP volumes.  I came up with a workaround that's now used as a fallback if we're on Leopard and NSDocument fails to save the file, but I'm not very enthusiastic about this.  E-mail offlist and I'll send a link to the code (BSD license).

--
adam
_______________________________________________

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

References: 
 >Saving an NSDocument safely (From: Thomas Thiriez <email@hidden>)
 >Re: Saving an NSDocument safely (From: Alastair Houghton <email@hidden>)
 >Re: Saving an NSDocument safely (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: +{NSImage imageNamed:fromBundle:]?
  • Next by Date: Dynamically validating undo menu item availability (NSUndoManager)
  • Previous by thread: Re: Saving an NSDocument safely
  • Next by thread: Source list group item indentation
  • Index(es):
    • Date
    • Thread