• 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
Current Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Current Document


  • Subject: Current Document
  • From: SWC <email@hidden>
  • Date: Wed, 17 Oct 2001 00:40:43 -0400

I'm writing my first multi-doc application, and think I have a pretty good grasp on most of the process, but am getting slightly hung up on messages which are to be routed to the current doc, whatever that may be. As an example, I have a command in the MainMenu.nib file which I want to get passed to the currently selected document.

I notice that the DocumentController class has a currentDocument method which seems to be what I'm looking for, but I am having trouble figuring out how to get ahold of the document controller. Is this the wrong way to go? I also see that NSApp provides a mainWindow method and a ketWindow method, but I dont see how to get from a given window, to the NSDocument it belongs to.

Could someone help me out here? It seems this should be really straightforward, as the need for this must come up fairly often. Am I overlooking something obvious?

Thanks alot,

Spencer


  • Follow-Ups:
    • Re: Current Document
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Transparent application icon
  • Next by Date: Re: Client / Server Application
  • Previous by thread: Re: Dynamically created widgets
  • Next by thread: Re: Current Document
  • Index(es):
    • Date
    • Thread