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

extra window


  • Subject: extra window
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 30 Jan 2002 08:48:23 -0800

My app uses a preferences window that's loaded from a separate nib file by
way of a window controller subclass, blah blah blah; i.e., to open the
preferences window, I instantiate the window controller subclass (if
necessary), which calls [super initWithWindowNibName:] to open the nib
file, the window controller subclass is the nib's owner, and its window is
the preferences window (a connection made in the nib file). All this seems
normal enough.

Now then. I have a class that registers itself as observer of the
NSWindowWillCloseNotification, and so I have observed an odd phenomenon.
When my application quits, then if the preferences window has ever been
opened, an extra window reports that it is closing. In other words, the
maximum number of windows opened by my application is *two*, the main
window and the preferences window; but on quitting, the
NSWindowWillCloseNotification arrives as many as *three* times - the main
window, the preferences window, and an unidentified NSWindow.

I can confirm using ObjectAlloc that opening my preferences window also
creates this extra window. The extra window is clearly *not* my preferences
window; for one thing, my preferences window is an NSPanel, whereas this
extra window is an NSWindow.

So what is this extra window? Thx - m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/


  • Prev by Date: Re: Simple Network Client Design (newbie alert)
  • Next by Date: Re: Simple Network Client Design (newbie alert)
  • Previous by thread: Fwd: NSDictionary -> Sparse Matrixes for Game Worlds)
  • Next by thread: Third party cocoa frameworks?
  • Index(es):
    • Date
    • Thread