• 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: Problem using filewrappers under snow leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using filewrappers under snow leopard


  • Subject: Re: Problem using filewrappers under snow leopard
  • From: Graham Cox <email@hidden>
  • Date: Wed, 14 Oct 2009 15:21:06 +1100


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


  • Follow-Ups:
    • Re: Problem using filewrappers under snow leopard
      • From: Eagle Offshore <email@hidden>
References: 
 >Re: Problem using filewrappers under snow leopard (From: Gabriel Zachmann <email@hidden>)
 >Re: Problem using filewrappers under snow leopard (From: Eagle Offshore <email@hidden>)

  • Prev by Date: wake the screen up for an Application event...
  • Next by Date: Re: Problem using filewrappers under snow leopard
  • Previous by thread: Re: Problem using filewrappers under snow leopard
  • Next by thread: Re: Problem using filewrappers under snow leopard
  • Index(es):
    • Date
    • Thread