• 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: how to print attributed strings to output (using NSLog? or otherwise)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to print attributed strings to output (using NSLog? or otherwise)


  • Subject: Re: how to print attributed strings to output (using NSLog? or otherwise)
  • From: John Stiles <email@hidden>
  • Date: Fri, 20 Jul 2007 14:09:30 -0700

On Jul 20, 2007, at 1:25 PM, Douglas Davidson wrote:


On Jul 20, 2007, at 1:19 PM, Andrew Farmer wrote:

On 20 Jul 07, at 11:26, Chase wrote:
if I create an attributed string and set its color to red, how can i print this into the output pane in xcode?

If you're trying to ask whether you can print it in red, the answer is "no". The XCode output pane does not support formatting.

On the other hand, if you have an attributed string and want to log both the text and the attributes for debugging purposes, NSAttributedString does have a (more or less intelligible) - description method. You can NSLog(@"the attributed string is %@", myAttributedString) if you like, and you will get a plain-text description of the various ranges of text and their attributes.


Douglas Davidson

Except the OP makes it seem like this was throwing an exception. :| _______________________________________________

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: how to print attributed strings to output (using NSLog? or otherwise)
      • From: "Clark Cox" <email@hidden>
References: 
 >how to print attributed strings to output (using NSLog? or otherwise) (From: "Chase" <email@hidden>)
 >Re: how to print attributed strings to output (using NSLog? or otherwise) (From: Andrew Farmer <email@hidden>)
 >Re: how to print attributed strings to output (using NSLog? or otherwise) (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Newbie Question: Why would my App freeze when I select a row inan NSTableView? - Found word(s) Re: in the subject
  • Next by Date: Re: how to print attributed strings to output (using NSLog? or otherwise)
  • Previous by thread: Re: how to print attributed strings to output (using NSLog? or otherwise)
  • Next by thread: Re: how to print attributed strings to output (using NSLog? or otherwise)
  • Index(es):
    • Date
    • Thread