AddressBook Record (Group/Person) ID: What's the best way to store ID in a NSDictionary?
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