Re: NSArray problems

2008-07-27 Thread Chris Suter
On 28/07/2008, at 1:06 PM, Daniel Richman wrote: I'd say you've either got a memory management issue, e.g. you're forgetting to retain numbers (are you using garbage collection?), or the debugger is getting confused and printing something else. That was it! I had forgotten to retain numb

Re: NSArray problems

2008-07-27 Thread Daniel Richman
I'd say you've either got a memory management issue, e.g. you're forgetting to retain numbers (are you using garbage collection?), or the debugger is getting confused and printing something else. That was it! I had forgotten to retain numbers. What confused me was that I was getting those bo

Re: NSArray problems

2008-07-27 Thread Andy Lee
On Jul 27, 2008, at 10:52 PM, Daniel Richman wrote: numbers = [allNumbers componentsSeparatedByString:@"\t"]; You don't own the return value from -componentsSeparatedByString:, so you must retain it if you want it to stick around. the contents of the array have become other, non string thi

Re: NSArray problems

2008-07-27 Thread Chris Suter
On 28/07/2008, at 12:52 PM, Daniel Richman wrote: [snip] So I'm befuddled. Any ideas? Sorry for the long post. I'd say you've either got a memory management issue, e.g. you're forgetting to retain numbers (are you using garbage collection?), or the debugger is getting confused and printin

NSArray problems

2008-07-27 Thread Daniel Richman
Hi All, I've been having some strange problems with an NSArray. It's probably something obvious, but I can't figure it out. I have an AppController class with an NSArray instance value, called numbers. numbers stores NSStrings (which are numbers, but I don't need them as ints or anything). T