AddressBook, ABMultiValue, and indexForIdentifier
AddressBook, ABMultiValue, and indexForIdentifier
- Subject: AddressBook, ABMultiValue, and indexForIdentifier
- From: "Terence G4 Mac" <email@hidden>
- Date: Wed, 27 Nov 2002 02:00:40 +0000
Hi all,
I'm experiencing some wierdness with the Address Book's indexForIdentifier
on ABMultiValue fields.
Specifically, there are cases where a contact entry clearly has, for
example, a home phone. Yet, when I query the ABMultiValue field for the
indexForIdentifier for the kABPhoneHomeLabel, I won't get a valid result.
Or, with code...
//...
ABMutableMultiValue *phone;
phone = [[person valueForProperty:kABPhoneProperty] mutableCopy];
if ([phone count] > 1)
{
i = [phone indexForIdentifier:kABPhoneHomeLabel];
if ((i > 0) && (i < 12))
[self setHome_phone1: [phone valueAtIndex:i]]; //never gets here
//....
}
The net result being that I never get a home phone value back, even if
there's one to get...
So, can anyone spot what I'm doing wrong? Is it the fact that I access the
mutableCopy instead of the valueForProperty directly?
Any thoughts would be greatly appreciated :)
Thanks!!
Terence
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.