extra window
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/