Re: Using NSDocument w/o always displaying the document window
Re: Using NSDocument w/o always displaying the document window
- Subject: Re: Using NSDocument w/o always displaying the document window
- From: PGM <email@hidden>
- Date: Sat, 22 Sep 2007 00:03:13 -0400
I'm trying to build a document based Cocoa app, but I don't always
want
to show my document window. My documents are more like command files.
They're created elsewhere and my app opens them and then depending on
the content either allows updates (shows the window) or just processes
the commands (no document window, just dialogs, or maybe I need
alternate document windows).
I haven't figured out how to not show the main document window. Is
this
even possible in an NSDocument based app, or do I need to take another
approach? I'd prefer to stay document based if possible. Creating
different document types (.xyz vs. .abc) isn't an option.
You can override makeWindowControllers and there simply do nothing
for documents for which you don't need a window. The following link
may help you though it is about something slightly different (one
window for all documents): http://www.cocoadev.com/index.pl?
DocumentBasedAppWithOneWindowForAllDocuments
Cheers, Patrick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden