Re: AddressBook - ABMultiValue
Re: AddressBook - ABMultiValue
- Subject: Re: AddressBook - ABMultiValue
- From: Ben Mackin <email@hidden>
- Date: Tue, 27 Aug 2002 16:27:03 -0700
On 8/27/02 4:12 PM, "email@hidden" <email@hidden> wrote:
>
If you specifically want to get the phone number with a Main
>
label, you'll have to iterate through the values checking labelAtIndex.
The issue is that I want to get a value from the address book, and it really
shouldn't be this difficult. What if I want the Home Fax number? Or the Work
Fax number?
What values would I iterate through, the values returned to me by myValues =
[[peopleFound objectAtIndex:0] valueForProperty:kABPhoneProperty]? And how
do I go through them one by one? This seems like it is more difficult than
it should be.
>
If you just want the primary phone number, you can ask for [myValues
>
valueAtIndex:[myValues indexForIdentifier:[myValues
>
primaryIdentifier]]] ... not the most intuitive approach, but it works.
This will only get me the primaryIdentifier (which if they have multiple
numbers listed, I can not count on what I will get).
Thanks,
Ben
_______________________________________________
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.