Howdy all,
I seem to be generating a lot of questions with this one little iPhone app....
I am attempting to stuff an NSMutableArray with NSStrings, and I am working like this:
...
NSString *myStr = [[NSString alloc] initWithString:@"Jupiter II"];
[txtArray addObject: myStr];
[myStr release];
NSString *myStr = [[NSString alloc] initWithString:@"Could this be OUR Waffles?"];
// in this second block, the line above generates the error: 'Redefinition of myStr'. Why?
[txtArray addObject: myStr];
[myStr release];
...
The first block generates no errors, but the subsequent blocks (identical save for the content of each string object) all generate the error, 'Redefinition of myStr'. Why?
I know that this is going to be a facepalm, but I just gotta know, and get beyond this!
hanks for any and all assistance!
Kind regards,
Steve O'Sullivan