Skip navigation.
 
mlCustom NSWindow and NSWindowDidResignKeyNotification AND NSWindowDidResignMainNotification
FROM : vance
DATE : Mon Apr 14 23:02:38 2008

I am dynamically (at runtime) creating an NSWindow instance with the 
following code:

   pullDownWindow = [[NSWindow alloc]
       initWithContentRect:[view bounds]
       styleMask:  NSBorderlessWindowMask|NSTexturedBackgroundWindowMask
       backing:NSBackingStoreBuffered
       defer:YES];
       
   [pullDownWindow setHasShadow: YES];
   [pullDownWindow setAlphaValue: 0.95];
   [pullDownWindow setOpaque: 0.9];

   [pullDownWindow setContentView: pullDownView ];

But I am not receiving NSWindowDidResignKeyNotification or 
NSWindowDidResignMainNotification notifications when I create the 
window dynamically.

However I do receive the 2 notification if I create the a regular 
default window using IB.

Am I forgetting to set something on the pullDownWindow instance?

Thanks in advance!
Vance

Related mailsAuthorDate
No related mails found.