On Jun 12, 2009, at 6:42 PM, John Ku wrote:
Here is a wild wild guess, perhaps I want to have my NSWindow to somehow belong to the menubar application. So technically, it looks like a window, but actually is just NSView drawn out from the menubar with no NSWindow but
accepts keyboard/mouse events?
Is it possible to have NSView without NSWindow?

No -- this is one avenue you can stop investigating right now. *Everything* is drawn in a window. To have some fun confirming this for yourself with no programming (just a couple of keystrokes you can do right this second), check out this article by Daniel Jalkut: <http://www.red-sweater.com/blog/97/windows-of-perception >.

As to what you're trying to achieve -- I think there has been some talking at cross purposes here. To the rest of us, "focus" means keyboard focus. Obviously keyboard focus can only be in one place at a time. I think in your terminology you've been mixing up "focus" with application activation, key vs. main window, and possibly other concepts.

When Mail is my active app and I bring up Spotlight, I see that it does not take away *main window* status from my Mail window -- i.e., the corner buttons don't gray out, the title bar doesn't dim, etc. I'm *guessing* this is what you mean, and that you're not really talking about focus or activation at all. I *think* what you want is for your window to override canBecomeMainWindow to return NO, but I haven't tried it myself.

Anyway, check this out for an explanation of key vs. main:

<http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html#//apple_ref/doc/uid/20000236-128794 >

--Andy

_______________________________________________

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