Hi,
I have successfully implemented the NSDocument architecture in my application 
and have implemented saving and loading documents by overriding the 
"dataOfType:error:" and "readFromData:ofType:error:" methods. I now want to be 
able to export my document into a folder selected by the user.  The items I 
will be putting in the folder are a few png images and a plain text file.  I 
have created a new package document type in the build target properties with 
the role value set as none.  The first gap in my knowledge is what the store 
type should be?
I am guessing that I should override the fileWrapperOfType:error: method so 
that if the type is "document package" I call a method to create a directory 
file wrapper with the images and text files I want instead of the default 
behaviour which is to create a file type NSFileWrapper with the data from the 
"dataOfType:error:" method.  I assume that the save panel will have asked the 
user for a directory as the document type is a package.
Finally, assuming my approach so far is correct, my last problem is I am unsure 
of how to add PNG images and a text file to the wrapper.  The images are stored 
as CGImageRefs and the text is in an NSString.
If anyone can clear any of this or maybe even all of this up or point me in the 
direction of an example I would be much obliged.
Cheers
M.J.
_________________________________________________________________
Share your photos with Windows Live Photos – Free.
http://clk.atdmt.com/UKM/go/134665338/direct/01/_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to