Re: NSDocument-based app limitations?
Re: NSDocument-based app limitations?
- Subject: Re: NSDocument-based app limitations?
- From: Mark Munz <email@hidden>
- Date: Tue, 30 Mar 2004 08:11:30 -0700
On Mar 30, 2004, at 2:26 AM, m wrote:
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.
Actually, it's one of the options that I've looked at as a way to solve
the inability to programmatically control what shows up in the save
panel. The downside to it is I wanted to mimic the TextEdit
auto-switching (plain vs. RTF) behavior. I may end up doing this and
living with the limitations.
Thanks.
Mark
_______________________________________________
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.