How come whenever I add a new object NSMutableDictionay to my NSMutableArray it replaces my previous object?
For example:
[appDelegate.tracksDict setObject:currentTrackTitle forKey:@"track_title"];
[appDelegate.tracksDict setObject:currentTrackTopic forKey:@"topic"];
[appDelegate.tracksArray addObject:[appDelegate.tracksDict copy]];
Its printing...
2010-10-01 14:03:35.021 XML[48889:207]Tracks Array: {
topic = "Cold Calling";
"track_title" = "Sleeping and selling";
}
2010-10-01 14:03:35.021 XML[48889:207]Tracks Array: {
topic = "Gate Keeper";
"track_title" = "Selling like a chicken";
}
2010-10-01 14:03:35.021 XML[48889:207]Tracks Array: {
topic = "Gate Keeper";
"track_title" = "Don't you try to sell";
}
Instead of something like...
2010-10-01 14:03:35.021 XML[48889:207]Tracks Array: {
topic = "Cold Calling";
track_title = "Sleeping and selling";
topic = "Gate Keeper";
track_title = "Selling like a chicken";
topic = "Gate Keeper";
track_title = "Selling like a chicken";
}
I'm sure its something stupid since I don't know the language very well.