• 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
Programatically opening an NSDocument subclass ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Programatically opening an NSDocument subclass ??
      • From: Ondra Cada <email@hidden>
    • Re: Programatically opening an NSDocument subclass ??
      • From: Robert S Goldsmith <email@hidden>
  • Prev by Date: Dot View + creating custom NSTable
  • Next by Date: Re: Object Allocations
  • Previous by thread: RE: Dot View + creating custom NSTable
  • Next by thread: Re: Programatically opening an NSDocument subclass ??
  • Index(es):
    • Date
    • Thread