Why is my window losing focus?
Why is my window losing focus?
- Subject: Why is my window losing focus?
- From: Philippe Martin <email@hidden>
- Date: Wed, 10 Jul 2002 16:45:26 +0200
Hi,
I have a background application (set as background using NSUIElement) that has a status item containing a menu built programmatically, and an NSPanel used for the preferences window. This window has a set of 4 tabs, three tableViews, a checkbox and some buttons. It is set as utility window, buffered and deferred. It can be opened by selecting an item from the menu (which is disabled as long as the window is open).
Everything works fine for a moment, but after some time (the way to trigger the problem is not obvious, but it seems to involve using the menu), the window looses focus as soon as I click on one of its objects. Put differently, somehow it's no longer the front window: the default button becomes grey and stops pulsating, and only the objects that are able to get clicks when the window isn't in front (like buttons) are able to get mouse clicks. Also, when the window isn't an utility window, it's title bar becomes transparent. At this step, when I click in a tableView, nothing happens.
I have no idea on where the focus is, at that time, nor on the reason why the window doesn't come back to the front when I click on it. The only way to get it back to the front is to switch to another application before clicking on my application's window. Then everything's fine for some time.
I've tried to make it modal, but that didn't help. I've even tried to end all my objects' action with a makeKeyAndOrderFront: message to the window, but that didn't help either. Anyone knows what's happening? I can't figure it out.
Thanks,
Philippe
--
______________________________________________________________________
Philippe MARTIN (a.k.a. Flip)
mailto:email@hidden
http://www.MacrobyteResources.com http://www.Free-Conversant.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.