• 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: Selected text in NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selected text in NSTextField


  • Subject: Re: Selected text in NSTextField
  • From: Graham Cox <email@hidden>
  • Date: Fri, 03 Feb 2012 11:10:44 +1100

NSPanel inherits NSWindow. If you look at the methods that NSPanel adds to NSWindow, it's really a very small set.

It allows:

a) the window to be a floating window

b) it allows the window to not become key "unless necessary", which is very useful to prevent a floater from stealing focus away from whatever it floats over, unless the user explicitly clicks in a text field, for example.

c) it allows the window to be receive events when run modally.

I think there are also some minor appearance differences.

That's all, so if your needs are not addressed by any of these features, you may as well use NSWindow.


--Graham




On 03/02/2012, at 10:51 AM, Dave Fernandes wrote:

> I'm still a little unclear on when to use an NSWindow and when to use an NSPanel. I thought you used an NSPanel if you did *not* want it to become key. But for input, you do want it to become key, don't you? I'm sure I've missed some basic Cocoa 101 here, but I found the docs "clear as mud" on this.
>
> Dave


_______________________________________________

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: Selected text in NSTextField
      • From: Dave Fernandes <email@hidden>
References: 
 >Re: Selected text in NSTextField (From: Graham Cox <email@hidden>)
 >Re: Selected text in NSTextField (From: Quincey Morris <email@hidden>)
 >Re: Selected text in NSTextField (From: Graham Cox <email@hidden>)
 >Re: Selected text in NSTextField (From: Dave Fernandes <email@hidden>)

  • Prev by Date: Re: Selected text in NSTextField
  • Next by Date: Re: Selected text in NSTextField
  • Previous by thread: Re: Selected text in NSTextField
  • Next by thread: Re: Selected text in NSTextField
  • Index(es):
    • Date
    • Thread