• 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
Very Newb Question about saving with NSDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Very Newb Question about saving with NSDocument
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: core data and loadDataRepresentationOfType
  • Next by Date: Re: Working set bloat in Xcode 2
  • Previous by thread: Re: NSNumber is completely broken
  • Next by thread: Re: Very Newb Question about saving with NSDocument
  • Index(es):
    • Date
    • Thread