Re: Selected text in NSTextField
Re: Selected text in NSTextField
- Subject: Re: Selected text in NSTextField
- From: Quincey Morris <email@hidden>
- Date: Thu, 02 Feb 2012 14:37:10 -0800
On Feb 2, 2012, at 14:23 , Graham Cox wrote:
> On 31/01/2012, at 7:14 PM, Dany Golubitsky wrote:
>
>> I am interested in opening NSAlert window that includes editable text field.
>
>
>
> Well, that's pretty daft :)
>
> NSAlert isn't designed for that purpose, so why try to make it fit somewhere it doesn't?
>
> Just use NSPanel, you'll find it a lot more amenable to what you're trying to do - don't fight the framework.
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.
2. There are no new frontiers in Cyrillic pornography. ;)
_______________________________________________
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