• 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: formatting issue in gdb
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: formatting issue in gdb


  • Subject: Re: formatting issue in gdb
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 13 Aug 2010 13:45:02 -0700

On Aug 13, 2010, at 13:20, Ludovic Nicolle wrote:

-(NSString*)description {
    return [NSString stringWithFormat: @"%@", [NSArray arrayWithObjects:
                                               [[MyContainedClass new] autorelease],
                                               [NSMutableArray arrayWithObjects: @"direct cocoa containers",  @"indent properly", nil],
                                               nil]];
}

Well, it rather looks like [NSArray description] escapes line endings in the strings that are the descriptions of each element, so that those line endings don't render ambiguous the [NSArray description]'s own inserted (formatting) line endings. Seems perfectly reasonable to me.

Unfortunately, rendering them ambiguous is exactly what you're trying to do. You're probably going to have to write a lot of explicit formatting code in your classes' 'description' methods, since NSArray's standard behavior isn't to your taste.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >formatting issue in gdb (From: Ludovic Nicolle <email@hidden>)

  • Prev by Date: formatting issue in gdb
  • Next by Date: Re: formatting issue in gdb
  • Previous by thread: formatting issue in gdb
  • Next by thread: Re: formatting issue in gdb
  • Index(es):
    • Date
    • Thread