Programatically opening an NSDocument subclass ??
Programatically opening an NSDocument subclass ??
- Subject: Programatically opening an NSDocument subclass ??
- From: Robert Miller <email@hidden>
- Date: Mon, 17 Sep 2001 09:43:08 -0400
- Organization: RFM & Associates
Hello,
This is probably a very basic question but, I have an application
that opens different types of subclassed NSDocuments. I want to be able
to select a file to open (NOT using the standard File/Open... menu item)
and displays its contents in the appropriate NSDocument subclass. I have
an IBAction stub implemented which calls a method in my AppController
class. At tha point I'de like to present the user with a file selection
dialog and then open a doc if the user selects a file. The example code
provided seems to assume that any application has a matching nib file
for the document and its window. The execution of this default behaviore
seems to happen 'magically' through the NSApplication object when the
standard File/Open menu item is used. How would I go about implementing
the same standard behavior in my own custom menu item ? are there any
eamples available ?
Thanks in advance,
Regards,
Bob M.