• 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
currentDocument returns nil (and it shouldn't)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

currentDocument returns nil (and it shouldn't)


  • Subject: currentDocument returns nil (and it shouldn't)
  • From: Huibert Aalbers <email@hidden>
  • Date: Sat, 31 Dec 2005 13:14:21 -0600

Hi,

I am developing a document based application. The class that extends
NSDocument is also a delegate for the document window. I use the
windowDidBecomeMain method to detect when a document is brought to the
front and update the palette windows. The palette window controllers
use [[NSDocumentController sharedDocumentController] currentDocument]
to find out the current document. Everything works fine when I switch
from one document to another. However, when I bring another
application to the front and then switch back to my app, the
windowDidBecomeMain method is invoked but [[NSDocumentController
sharedDocumentController] currentDocument] returns nil. Any ideas as
to what is happening and how I can fix or get around this behaviour?

Regards,

Huibert

--
Viisit my home page at http://www.huibert-aalbers.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Re: Agent Applications and launchd
  • Next by Date: CoreData just started geving me this error...
  • Previous by thread: Anyone else with a crashing Syncrospector?
  • Next by thread: CoreData just started geving me this error...
  • Index(es):
    • Date
    • Thread