• 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
AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?


  • Subject: AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?
  • From: "Lee, Frederick" <email@hidden>
  • Date: Thu, 14 Aug 2008 14:16:33 -0400
  • Thread-topic: AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?

I would like to store references to members of the AddressBook in a
NSDictionary.

I found that I can use ABRecordGetRecordID to get a unique ID of a
particular ABRecord (Group/Person).

I want to store it in a NSDictionary for future reference (to
access/delete the record from the AddressBook).



The Record ID is an integer type.



Do I store it with NSDictionary as a NSInteger?



 I tried to convert the integer into a pointer (via casting).

Like this:



NSInteger myID = ABRecordGetRecordID(myABGroup);

[myDict setObject:(NSInteger)myID forKey:groupName];



But I get a compiler warning about the pointer vs integer.



Must I wrap the AB unique key into a NS Object first?



I'm getting lost here.



Regards,

Ric.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: CGWindowListCopyWindowInfo(), how to pick relevant windows
  • Next by Date: Why does Core Data retain an object when one of that object's attributes is changed?
  • Previous by thread: CGWindowListCopyWindowInfo(), how to pick relevant windows
  • Next by thread: Re: AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?
  • Index(es):
    • Date
    • Thread