i am trying to build a panel window. The panel is supposed to be opened from a document window.
And i use a static window controller object to open the panel.
I want the document window to be able to hear the NSWindowWillCloseNotification only send from the
static panel window controller. The code is shown below:
When the app runs, the document cannot hear the notification.
If no object is passed (instead of p, i use nil) the document hears
the notification, but at the same time it hears NSWindowWillCloseNotification
from other documents also. A behavior i do not want.