OPENSTEP The One
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
|
Posted: Mon Feb 23, 2004 1:54 pm Post subject: [NSApp run] and Notification Centers |
|
I'm at work and doing some Cocoa hacking and ran into another interesting reason that it's a Good Thing (TM) to move Cocoa hacks to [NSApp run]...
When using the event pull loop model like Neo used to, the automatic handling of the Windows menu in the handle given by [NSApp setWindowsMenu] is broken. Windows are added in, but they are never successfully removed. After a little research, it appears that the problem lies with the default notification center. NSWindowWillCloseNotifications never seem to get sent to observers registered on the default notification center. This makes it seem like dispatch of posted notifications in the default notification queue are handled by more voodoo within [NSApp run]. It also seems the standard Window menu processing handles removal of windows through these notifications.
Shouldn't affect the new event handling, but I figured I'd make a note for posterity and other Cocoa hackers.
ed |
|