Re: printing arrays

2012-11-08 Thread Gerriet M. Denkmann
On 3 Nov 2012, at 22:42, Kyle Sluder wrote: > On Nov 2, 2012, at 10:18 PM, "Gerriet M. Denkmann" > wrote: > >> >> On 3 Nov 2012, at 00:35, Kyle Sluder wrote: >> >>> If this is just for debugging purposes, you could swizzle -[NSArray >>> description] and -[NSDictionary description]. >> >>

Re: printing arrays

2012-11-03 Thread Gerriet M. Denkmann
On 3 Nov 2012, at 22:42, Kyle Sluder wrote: > On Nov 2, 2012, at 10:18 PM, "Gerriet M. Denkmann" > wrote: > >> >> On 3 Nov 2012, at 00:35, Kyle Sluder wrote: >> >>> If this is just for debugging purposes, you could swizzle -[NSArray >>> description] and -[NSDictionary description]. >> >>

Re: printing arrays

2012-11-03 Thread Gerriet M. Denkmann
On 3 Nov 2012, at 12:47, Quincey Morris wrote: > On Nov 2, 2012, at 22:18 , "Gerriet M. Denkmann" wrote: > >> Is there a way to make the first NSLog work? >> I seem to remember that it calls something like debuggingDescription, which, >> if not overridden calls description. >> >> I have no

Re: printing arrays

2012-11-03 Thread Kyle Sluder
On Nov 2, 2012, at 10:18 PM, "Gerriet M. Denkmann" wrote: > > On 3 Nov 2012, at 00:35, Kyle Sluder wrote: > >> If this is just for debugging purposes, you could swizzle -[NSArray >> description] and -[NSDictionary description]. > > I tried a Category for NSArray like: You must never use a ca

Re: printing arrays

2012-11-02 Thread Quincey Morris
On Nov 2, 2012, at 22:18 , "Gerriet M. Denkmann" wrote: > Is there a way to make the first NSLog work? > I seem to remember that it calls something like debuggingDescription, which, > if not overridden calls description. > > I have no experience with swizzling. Aren't you making things rather

Re: printing arrays

2012-11-02 Thread Gerriet M. Denkmann
On 3 Nov 2012, at 00:35, Kyle Sluder wrote: > On Fri, Nov 2, 2012, at 10:02 AM, Gerriet M. Denkmann wrote: >> This code: >> >> NSString *key = @"กุญแจ"; >> NSString *value = @"คุณค่า"; >> NSArray *array = @[ key, value ]; >> NSLog(@" Two nice strings: %@ %@", key, value); >> NSLog(@" Bad Array:

Re: printing arrays

2012-11-02 Thread Greg Guerin
Gerriet M. Denkmann wrote: 2012-...] Bad Array: ( "\U0e01\U0e38\U0e0d\U0e41\U0e08", "\U0e04\U0e38\U0e13\U0e04\U0e48\U0e32" ) For a very long time, the -description method of NSArray (and other collection classes) has produced the old-style ASCII plist format. Since that format h

Re: printing arrays

2012-11-02 Thread Kyle Sluder
On Fri, Nov 2, 2012, at 10:02 AM, Gerriet M. Denkmann wrote: > This code: > > NSString *key = @"กุญแจ"; > NSString *value = @"คุณค่า"; > NSArray *array = @[ key, value ]; > NSLog(@" Two nice strings: %@ %@", key, value); > NSLog(@" Bad Array: %@", array); > > prints: > > 2012-...] Two nice stri

printing arrays

2012-11-02 Thread Gerriet M. Denkmann
This code: NSString *key = @"กุญแจ"; NSString *value = @"คุณค่า"; NSArray *array = @[ key, value ]; NSLog(@" Two nice strings: %@ %@", key, value); NSLog(@" Bad Array: %@", array); prints: 2012-...] Two nice strings: กุญแจ คุณค่า 2012-...] Bad Array: ( "\U0e01\U0e38\U0e0d\U0e41\U0e08",