Hi everyone,
I managed to figure out what the problem was with my previous question (Dictionary won't write to disk). I was grabbing the track id incorrectly, which was messing up the dictionary.
That said, I have this line in the dictionary I'm parsing:
<key>Track ID</key><integer>3363</integer>
And this is how I'm trying to grab it (currentTrack is an NSDictionary that contains the information):
NSNumber *tID = [NSNumber numberWithUnsignedInt:[currentTrack objectForKey:@"Track ID"]]; NSString *trackID = [NSString stringWithString:[tID stringValue]]; NSLog(trackID);
Obviously something isn't working right (otherwise I wouldn't be asking a question....). What I'm logging are numbers that are waaaaay too large:
2005-06-10 11:43:13.686 MyApp[729] 3927040 2005-06-10 11:43:13.687 MyApp[729] 23267120 2005-06-10 11:43:13.687 MyApp[729] 3889936 2005-06-10 11:43:13.687 MyApp[729] 24099552 2005-06-10 11:43:13.687 MyApp[729] 68160640 2005-06-10 11:43:13.687 MyApp[729] 23649536 2005-06-10 11:43:13.688 MyApp[729] 68533472 2005-06-10 11:43:13.688 MyApp[729] 3927808
The largest number I should be getting is 3363. Not 68.5 million. What do I need to do to get that integer correctly? (and sorry for a dumb question)
Thanks!
Dave |