• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSView directly drawn on screen?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView directly drawn on screen?


  • Subject: Re: NSView directly drawn on screen?
  • From: Andy Lee <email@hidden>
  • Date: Sat, 13 Jun 2009 19:57:57 -0400

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


  • Follow-Ups:
    • Re: NSView directly drawn on screen?
      • From: Andy Lee <email@hidden>
References: 
 >NSView directly drawn on screen? (From: John Ku <email@hidden>)
 >Re: NSView directly drawn on screen? (From: Chunk 1978 <email@hidden>)
 >Re: NSView directly drawn on screen? (From: John Ku <email@hidden>)
 >Re: NSView directly drawn on screen? (From: Chunk 1978 <email@hidden>)
 >Re: NSView directly drawn on screen? (From: John Ku <email@hidden>)
 >Re: NSView directly drawn on screen? (From: John Ku <email@hidden>)

  • Prev by Date: Re: Putting files in an flat-file executable
  • Next by Date: Re: NSView directly drawn on screen?
  • Previous by thread: Re: NSView directly drawn on screen?
  • Next by thread: Re: NSView directly drawn on screen?
  • Index(es):
    • Date
    • Thread