Re: NSDocument-based app limitations?
Re: NSDocument-based app limitations?
- Subject: Re: NSDocument-based app limitations?
- From: m <email@hidden>
- Date: Tue, 30 Mar 2004 01:26:11 -0800
On Mar 29, 2004, at 7:44 PM, Mark Munz wrote:
Like TextEdit, I have either plain text files or rich text files.
Right now they're are both using the same subclass of NSDocument.
When I save a file, I'm shown all the file types (both plain and rich)
in the filetype popup and there doesn't seem to be a way to just show
some of them. Am I missing something obvious here? The filetype info
seems to be class based and immutable -- which seems really strange.
Shooting from the hip a bit here, but:
From your description I'm assuming you never want to save a plain text
file as a rich text file and vice versa.
Couldn't you have trivial sub-classes of your current document class
(in fact, I don't think you'd actually have to override anything), one
for plain text and one for rich text? What I'm thinking is that with
separate sub-classes for the two types of files, you could control what
types they present to the user by editing the Document Types section of
the Properties tab of the Target inspector.
Sorry if this is a dumb idea, it's late and I'm sleepy.
_murat
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.