Re: Problem using filewrappers under snow leopard
Re: Problem using filewrappers under snow leopard
- Subject: Re: Problem using filewrappers under snow leopard
- From: Eagle Offshore <email@hidden>
- Date: Tue, 13 Oct 2009 21:45:30 -0700
See other message - it makes zero difference.
On Oct 13, 2009, at 9:21 PM, Graham Cox wrote:
On 14/10/2009, at 3:07 PM, Eagle Offshore wrote:
I'm compiling against 10.4 SDK. I started this project under
Tiger. Its the same project file.
On Oct 8, 2009, at 2:07 AM, Gabriel Zachmann wrote:
And it is maddening because the error occurs outside my code. My
document class implements
Maybe I missed it, but ... are you compiling with Garbage
Collection = Supported (or Required) under Snow Leopard?
Change your code to do this as suggested:
NSFileWrapper* fw = [[NSFileWrapper alloc]
initDirectoryWithFileWrappers:nil];
[fw addRegularFileWithContents:primaryContent
preferredFilename:@"file1.pri"];
[fw addRegularFileWithContents:secondaryContent
preferredFilename:@"file2.sec"];
[fw addRegularFileWithContents:tertiaryContent
preferredFilename:@"file3.ter"];
return [fw autorelease];
There's more to setting up a file wrapper than your code is doing,
but which is all handled for you using -addRegularFileWithContents:
Earlier versions of the OS let you get away without doing the full
correct set up, but now you've been bitten, so fix your code. If you
look at the documentation for the above method, it tells you all the
steps it takes, most of which your code isn't doing.
--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