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: Douglas Davidson <email@hidden>
- Date: Fri, 20 Jul 2007 13:25:51 -0700
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
_______________________________________________
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