• 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: Dave Fernandes <email@hidden>
  • Date: Thu, 02 Feb 2012 18:51:08 -0500

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

On 2012-02-02, at 6:02 PM, Graham Cox wrote:

>
> On 03/02/2012, at 9:37 AM, Quincey Morris wrote:
>
>> You're the second person who's scorned the idea of adding things to an alert. In fact, NSAlert is explicitly designed to allow adding controls via an accessory subview:
>>
>> 	http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Dialog/Articles/CustomAlertDialogs.html
>>
>> One of the benefits of using a customized alert is that you don't have to worry about resizing the window based on the size of the message and informative text.
>>
>> OTOH, looking at the OP's links to screenshots, two things are obvious:
>>
>> 1. This particular task isn't one that NSAlert is suitable for. It's not actually an alert.
>
> We used to call these 'dialogs'. Panels seems to be the preferred Cocoa terminology.
>
> Notwithstanding the (minor) benefits of NSAlert, (and internally it's implemented in terms of NSPanel, I would assume), the design of NSAlert makes it harder to set up interactivity, because it doesn't have an explicit controller - it inherits NSObject, not NSWindowController or even NSPanel. In other words, it's designed for a different job to the OP's.
>
> My view is, if you need any input fields in a dialog, the go-to class is NSPanel, not NSAlert.
>
>>
>> 2. There are no new frontiers in Cyrillic pornography. ;)
>
> LOL, indeed.
>
> --Graham
>
>
> _______________________________________________
>
> 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


  • Follow-Ups:
    • Re: Selected text in NSTextField
      • From: Graham Cox <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>)

  • Prev by Date: Re: ARC and 10.6
  • 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