Re: AddressBook - ABMultiValue
Re: AddressBook - ABMultiValue
- Subject: Re: AddressBook - ABMultiValue
- From: Ben Mackin <email@hidden>
- Date: Tue, 27 Aug 2002 14:20:24 -0700
On 8/27/02 12:48 PM, "Andy Lee" <email@hidden> wrote:
>
The problem is that myIndex is getting a value of -1, meaning the
>
identifier kABPhoneMainLabel was not found in myValues.
So the identifier kABPhoneMainLabel is wrong, or in my address book (the
application) that value doesn't exist for the name I am searching? Meaning
could kABPhoneMainLabel potentially be a valid identifier?
I just verified my address book, and I do have an entry for the main phone
number. I also have an entry for the Home Fax number, so I tried changing
the line to:
string = [myValues valueAtIndex:[myValues
indexForIdentifier:kABPhoneHomeFAXLabel]];
And I get the same thing. Something is not acting correctly.
>
You could work around this with something like:
>
>
myIndex = [myValues indexForIdentifier:kABPhoneMainLabel];
>
if (myIndex >= 0)
>
{
>
string = [myValues valueAtIndex:myIndex];
>
}
>
else
>
{
>
string = nil;
>
}
If I am reading you correctly, this would only be helpful if there was no
address book entry for the main phone number (or whatever I am checking). My
issue is that there is an entry in the address book, I just cant get
indexForIdentifier to return me a valid value.
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.