Re: Using AddressBook
Re: Using AddressBook
- Subject: Re: Using AddressBook
- From: email@hidden
- Date: Fri, 30 Aug 2002 12:16:12 -0700
Peter:
There's documentation available regarding the API for working with
Address Book that should answer most of your questions. Following the
information contained there, I've been able to build a fairly
sophisticated utility application around Address Book (it should be
released to the public in less than a week :-))...
Regarding you specific questions:
#2: To my knowledge, there's no logic yet for this sort of thing.
#3: All address book records are ABPerson objects. There's no
distinction between a company record and a person record. You could
however implement a category method (e.g., "isCompany") that simply
returns YES if the ABPerson does not have values for First and Last.
#4: Here's how I get at all the members of a particular group.
Basically, I first find the matching ABGroup, then ask it for it's
members:
groupSearch = [ABGroup
searchElementForProperty:kABGroupNameProperty
label:nil
key:nil
value:@"MyGroup"
comparison:kABEqualCaseInsensitive];
searchResult = [addressBook
recordsMatchingSearchElement:groupSearch];
group = [searchResult objectAtIndex:0];
groupMembers = [group members];
Hope this helps!
Cheers,
- Eric Hanson
Incarna LLC
On Friday, August 30, 2002, at 12:01 PM, Mark's Studio wrote:
>
I just started to implement the addressbook and i have some questions.
>
>
1. is there a public interface for the addressbook ?
>
>
2. is there a way to access "recent email addresses"?
>
>
3. how do i tell if a record is a person or a company?
>
>
4.how do i setup a ABSearchElement to only return members of group?
>
>
Thanks
>
Peter Mark
>
>
Mark's Recording Studio A/S
>
Faelledvej 19 b DK2200 N
>
Copenhagen Denmark
>
Tel: +45 35366078 Fax: +45 35366038
>
www.marks-studio.dk
>
email@hidden
>
_______________________________________________
>
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.
_______________________________________________
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.