• 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
Re: AddressBook - ABMultiValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: AddressBook - ABMultiValue
      • From: Andy Lee <email@hidden>
References: 
 >Re: AddressBook - ABMultiValue (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Which frameworks to link against to use Address Book APIs?
  • Next by Date: Re: Which frameworks to link against to use Address Book APIs?
  • Previous by thread: Re: AddressBook - ABMultiValue
  • Next by thread: Re: AddressBook - ABMultiValue
  • Index(es):
    • Date
    • Thread