• 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: NSAttributedString & alert panels?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAttributedString & alert panels?


  • Subject: Re: NSAttributedString & alert panels?
  • From: Jonathan del Strother <email@hidden>
  • Date: Tue, 24 Jan 2006 17:06:01 +0000


On 24 Jan 2006, at 16:51, Andy Lee wrote:

On Jan 24, 2006, at 10:04 AM, Camillo Lugaresi 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.

Out of curiosity I just tried this, and the string is still displayed unattributed

Damn. Well, good to know that it's not just me doing something silly, then. Thanks for trying that.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >NSAttributedString & alert panels? (From: Jonathan del Strother <email@hidden>)
 >Re: NSAttributedString & alert panels? (From: Jonathan del Strother <email@hidden>)
 >Re: NSAttributedString & alert panels? (From: Camillo Lugaresi <email@hidden>)
 >Re: NSAttributedString & alert panels? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: what is [textStorage paragraphs]???
  • Next by Date: Re: QTKit problems - add audio to movie blits to screen!?!
  • Previous by thread: Re: NSAttributedString & alert panels?
  • Next by thread: Objects cross calls
  • Index(es):
    • Date
    • Thread