• 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
Re: Path of least resistance with NSDocument.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path of least resistance with NSDocument.


  • Subject: Re: Path of least resistance with NSDocument.
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 20 Aug 2001 23:37:50 -0700

On Monday, August 20, 2001, at 10:56 AM, Vince DeMarco wrote:

On Monday, August 20, 2001, at 07:03 AM, John C. Randolph wrote:

I'm working on an NSDocument-based app, that accumulates data in a temporary file, and I'm doing this:

- (NSData *)dataRepresentationOfType:(NSString *)type
{
return [NSData dataWithContentsOfFile:tempPath];
}

to let the user save the file.

Now, taking this route, is there any way for me to set the file extension and the HFS type code, or do I have to abandon this approach and implement - writeToFile:ofType: instead?

Isn't there some property list or something I

Set up the property list in the app that describes the document class etc.

NSDocument will do the right thing.

And so it does! With a pop up list for file type in the save sheet, yet!

Have I mentioned that NSDocument ROCKS?

-jcr


For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken


References: 
 >Re: Path of least resistance with NSDocument. (From: Vince DeMarco <email@hidden>)

  • Prev by Date: Re: WTF? How can this work?
  • Next by Date: Re: NSOutline view with draggable/reorderable items?
  • Previous by thread: Re: Path of least resistance with NSDocument.
  • Next by thread: How to check a given input?
  • Index(es):
    • Date
    • Thread