ok... so here's a strange issue:

resigning the key window works fine

-=-=-=-
- (void)resignKeyWindow
        {
        NSLog (@"Out");
        }
-=-=-=-

but if i also include the following method, resignKeyWindow no longer
works, and i only receive logs for becomeKeyWindow:

-=-=-=- 
- (void)becomeKeyWindow
        {
        NSLog (@"In");
        }
-=-=-=-
You seem a bit mixed up here (but then it is Cocoa).
Have you subclassed NSWindow or are you using a delegate?
SubClassing NSWindow is tricker than using the delegate approach.

-becomeKeyWindow is not a delegate method but a class method.
If you override it in an NSWindow subclass and don't pass it on to the super class you will muck up the window handling.

You don't need to read the Cocoa docs you need to inject them into your bloodstream!


writing instead becomeMainWindow works better, but in order for it to
work i need to set canBecomeKeyWindow:NO on all the other windows
produced by this window (like the NSColorPanel)...


On Sun, Dec 14, 2008 at 11:34 AM, James Bucanek <subscri...@gloaming.com > wrote:
Chunk 1978 <mailto:chunk1...@gmail.com> wrote (Sunday, December 14, 2008 8:28 AM -0500):

honest to god, i have zero idea why this isn't working...

- (void)windowDidResignKey:(NSNotification *)notification
{
NSLog(@"window resigned key");
}

Probably because it's resignKeyWindow: not windowDidResignKey:

--
James Bucanek


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com

This email sent to jonat...@mugginsoft.com

Jonathan Mitchell

Central Conscious Unit
http://www.mugginsoft.com





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to