• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help parsing dictionary integer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Help parsing dictionary integer
      • From: Dave DeLong <email@hidden>
References: 
 >Help parsing dictionary integer (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: Am I overreleasing something?
  • Next by Date: Re: Help parsing dictionary integer
  • Previous by thread: Help parsing dictionary integer
  • Next by thread: Re: Help parsing dictionary integer
  • Index(es):
    • Date
    • Thread