Re: How best to archive in CSV format
Re: How best to archive in CSV format
- Subject: Re: How best to archive in CSV format
- From: Denis Stanton <email@hidden>
- Date: Wed, 18 May 2005 07:33:53 +1200
Hi j o a r
Thank you, that answers my question precisely, even though the answer
is "don't do that". It matches whet I have done.
- Do modify dataRepresentationOfType and loadDataRepresentation:ofType:
- Don't mess with NSKeyedArchiver and coder. They have their own
agenda with handling an object graph. Even if I could write csv
versions of the class instances NSKeyedArchiver would want to include
the information that they were in an array so it would add information
to the output file.
Thanks for your help
Denis
On May 17, 2005, at 6:00 PM, j o a r wrote:
On 17 maj 2005, at 04.08, Denis Stanton wrote:
That's not the part that worries me. My question whether I should be
writing this CSV conversion stuff inside the standard methods
encodeWithCoder and initWithCoder, and if so how. It seems the
Cocoa architecture has a well-thoughtout mechanism for archiving and
I should try and work within it. My problem is the example I have
produces a binary coded disk file and I need csv text. I want to
make the Cocoa archive mechanism work with csv.
Why not do it in the dataRepresentationOfType: and
loadDataRepresentation:ofType: methods of your document subclass?
NSKeyedArchiver provides a way to store / restore an object graph, and
it provides it's own storage format. Since neither of that seems to be
something that's really useful for you, I'd suggest that you avoid
using it for this particular purpose.
j o a r
Denis Stanton
Orcon Internet Limited
(09) 480 9299
http://www.orcon.net.nz
_______________________________________________
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