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

AddressBook - ABMultiValue


  • Subject: AddressBook - ABMultiValue
  • From: Ben Mackin <email@hidden>
  • Date: Mon, 26 Aug 2002 23:08:38 -0700

I have been working on adding Address Book support (10.2) to my app and
everything is going great, except for one thing. I have been reading about
this whole ABMultiValue thing, and thought I had gotten it. But when I try
and use the following code:

ABMultiValue *myValues;
int myIndex;

myValues = [[peopleFound objectAtIndex:0]
valueForProperty:kABPhoneProperty];
myIndex = [myValues indexForIdentifier:kABPhoneMainLabel];
string = [myValues valueAtIndex: myIndex];

I get an error that:

-[NSCFArray objectAtIndex:]: index (2147483647) beyond bounds (2)

So when I am supposed to supply an identifier, is it not supposed to be one
from ABGlobals.h? I know there is a value in the address book for
kABPhoneMainLabel, and another in the phone tree (the fax number) so I think
something should be returned.

I have read through the manual (page) on this, and from my understanding
this should work, right?

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: Henri Lamiraux <email@hidden>
    • Re: AddressBook - ABMultiValue
      • From: email@hidden
    • Re: AddressBook - ABMultiValue
      • From: Roarke Lynch <email@hidden>
  • Prev by Date: Re: NSTableView and clipping
  • Next by Date: Resizing an NSBox/multiple control sets
  • Previous by thread: Re: Oddity with Windows
  • Next by thread: Re: AddressBook - ABMultiValue
  • Index(es):
    • Date
    • Thread