Re: Help parsing dictionary integer
Re: Help parsing dictionary integer
- Subject: Re: Help parsing dictionary integer
- From: Frederick Cheung <email@hidden>
- Date: Fri, 10 Jun 2005 17:55:20 +0100
On 10 Jun 2005, at 17:50, Dave DeLong wrote:
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"]];
[currentTrack objectForKey:@"Track ID"] is an object, not an unsigned
int. You are creating a NSNumber which contains an integer
representation of the pointer, ie the address at which the object is
stored, not the number it represents.
Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden