Re: NSView directly drawn on screen?
Re: NSView directly drawn on screen?
- Subject: Re: NSView directly drawn on screen?
- From: Andy Lee <email@hidden>
- Date: Sat, 13 Jun 2009 20:15:35 -0400
Hm, I did a quick experiment and haven't been able to achieve what (I
think) you want. Anyway, I should probably have looked more closely
at other replies -- Kyle's suggestion about LSUIElement looks promising.
--Andy
On Jun 13, 2009, at 7:57 PM, Andy Lee wrote:
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 (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden