Re: how to print attributed strings to output (using NSLog? or otherwise)
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