Re: NSAttributedString & alert panels?
Re: NSAttributedString & alert panels?
- Subject: Re: NSAttributedString & alert panels?
- From: Camillo Lugaresi <email@hidden>
- Date: Tue, 24 Jan 2006 16:04:31 +0100
On 24/gen/06, at 15:26, Jonathan del Strother wrote:
On 23 Jan 2006, at 11:53, Jonathan del Strother wrote:
Is there any way to get NSRunAlertPanel or NSAlert to use
attributed strings?
I'd like to place a link in the text - do I have to create a
custom window just for this? Or any tips what I'd need to do to
subclass the NSAlert class to do this for me?
Anyone?
I don't think you need a subclass. Use the window method to get the
window of the NSAlert, then do whatever you want with it. For
example, you could look for a text field inside the window whose text
is the unattributed string you passed to setInformativeText, and if
you find it customize it as needed. Of course, the layout of alerts
could change in the future, so be careful and make sure you handle
failures gracefully.
Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden