Re: Image export/import question
Re: Image export/import question
- Subject: Re: Image export/import question
- From: Sherm Pendley <email@hidden>
- Date: Sun, 3 Oct 2004 08:29:54 -0400
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.
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