• 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
NSDocument Save As to Windows share is failing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocument Save As to Windows share is failing


  • Subject: NSDocument Save As to Windows share is failing
  • From: "Doug Knowles" <email@hidden>
  • Date: Wed, 23 Jul 2008 23:03:16 -0400

Hi, all,
In the application I'm being paid to finish (soon), we're finding that we
can't save our document to a directory on a Windows share, and some further
experimentation indicates that it's not unique to our app.  Since it seems
likely that others have seen this phenomenon, I'm looking for advice on how
to handle this.

Here's what's happening:

- When Save As... is selected from the menu, our implementation
of writeToURL:ofType:error: is being called with an URL specifying a
location in a hidden temporary folder in the directory (in a shared
directory on a Windows machine) targeted by the user.  We understand this to
be part of the normal behavior of NSDocument, ensuring that the write
completes successfully before putting the file in it's real destination.  OK
so far.

- Stepping through this in the debugger, we can confirm that the file is
properly written to its destination in the temporary

- After we successfully write the file, an alert is displayed that reports
that the document could not be saved.  It appears that NSDocument is failing
to move the file to its proper location and reporting it as an error.

We have confirmed that a few other Mac apps exhibit the same error when they
try to Save As to a Windows share, so we're pretty confident that this is
problem is not unique to us.

Has anyone else experienced this, and, more importantly, has anyone devised
a workaround?  I'm thinking of overriding [NSDocument saveDocumentAs] to
bypass (and re-implement) the temporary file business, but given our tight
timeframe, I'd appreciate the benefit of some experience if it's available.

TIA,

Doug K;
_______________________________________________

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: NSDocument Save As to Windows share is failing
      • From: "Adam R. Maxwell" <email@hidden>
    • Re: NSDocument Save As to Windows share is failing
      • From: Graham Cox <email@hidden>
  • Prev by Date: A study of the Cocoa Indie Island
  • Next by Date: Re: NSDocument Save As to Windows share is failing
  • Previous by thread: A study of the Cocoa Indie Island
  • Next by thread: Re: NSDocument Save As to Windows share is failing
  • Index(es):
    • Date
    • Thread