Re: Selected text in NSTextField
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