Re: Packages vs. Finder (perceived stability problem)
Re: Packages vs. Finder (perceived stability problem)
- Subject: Re: Packages vs. Finder (perceived stability problem)
- From: m <email@hidden>
- Date: Sun, 10 Apr 2005 01:12:49 -0700
To answer my own query: reinvent the wheel. Feh.
In summary: override NSDocument's
writeWithBackupToFile:ofType:saveOperation: method to write the package
to a temporary directory, then replace the contents of the desired
package with that of the temp package.
In pseudo code
if (fullDocumentPath is the same as [self fileName])
{
write document to tempPath (ie call [self writeToFile:tempPath
ofType:docType])
remove contents of directory at fullDocumentPath
copy contents of directory at tempPath to fullDocumentPath
delete directory at tempPath
}
else
{
call inherited
}
_murat
On Apr 10, 2005, at 12:46 AM, m wrote:
On Apr 9, 2005, at 7:25 AM, Gregory Weston wrote:
[saving documents that implemented as packages doesn't preserve icon
locations]
Consider FSExchangeObjects. I don't know that it will do what you
want, but I think it may and it has value otherwise over the
technique I think you're using:
<http://developer.apple.com/documentation/Carbon/Reference/
File_Manager/file_manager/chapter_1.2_section_22.html#//apple_ref/
doc/uid/TP30000107-DontLinkChapterID_2-F13080>
It looks like FSExchangeObjects() and its analogs only work on files.
Packages (wrappers) are directories so this won't work. :(
Any other ideas?
_______________________________________________
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