Very Newb Question about saving with NSDocument
Very Newb Question about saving with NSDocument
- Subject: Very Newb Question about saving with NSDocument
- From: Ian Jackson <email@hidden>
- Date: Wed, 25 May 2005 22:54:14 +1200
Hi All,
I'm trying to learn how to do stuff with NSDocument, and already stuck at the first hurdle - I'm trying to save something that's not text. A BezierPath in fact. So it seems from what I've read that if I can return something in the form of NSData, I can use dataRepresentationofType:aType. But I don't know how to turn something into NSData. I've already written something where I encode the path:
- (void) encodeWithCoder: (NSCoder *)coder { [coder encodeObject:thePath forKey:@"path"]; }
and the corresponding initWithCoder, but I can't see what I'm supposed to do with these encoded things, if anything. The documentation mentions that opening and saving is made easy with NSDocument, but clearly not easy enough for me.
Hoping someone will have patience with me,
Ian. |
_______________________________________________
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