• 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: Image export/import question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image export/import question


  • Subject: Re: Image export/import question
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 3 Oct 2004 09:00:36 -0400

On Oct 3, 2004, at 8:29 AM, Sherm Pendley wrote:

On Oct 3, 2004, at 8:12 AM, Peter Karlsson wrote:

Ok, I want to create my own file package using NSFileWrapper. But I don't
know what I am supposed to do. I have looked at the docs at Apple but I
can't figure it out. Can someone please tell me how to start.

Start with your NSDocument subclass. Instead of overriding -dataRepresentationOfType: and -loadDataRepresentation:ofType:, override -fileWrapperRepresentationOfType: and -loadFileWrapperRepresentation:ofType:.

Example code is always welcome.

I don't have any at hand, but in a nutshell it's pretty easy. Then add one or more file wrappers - which are NSFileWrapper instances - to an NSDictionary. Then use that dictionary to create a dictionary wrapper, which is also an NSFileWrapper instance.

Blah. Never post before coffee. :-(

I meant to write, use that dictionary to create a *directory* wrapper...

Finally, use the directory wrapper's -writeToFile:atomically:updateFilenames: method to write the whole mess to disk.

sherm--

_______________________________________________
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
References: 
 >RE: RE: Re: Image export/import question (From: "Peter Karlsson" <email@hidden>)
 >Re: Image export/import question (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: Image export/import question
  • Next by Date: Re: Any news about Cocoa Java ?
  • Previous by thread: Re: Image export/import question
  • Next by thread: Re: Image export/import question
  • Index(es):
    • Date
    • Thread