image
image

|


Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old July 28th, 2005, 07:02 AM
Registered User
 
Join Date: Sep 2003
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
cbl2001 is on a distinguished road
Cocoa Address Book API - Nothing works!

Hi,

I am trying to build address book access into my cocoa app using the address book API. No matter what I do (using every example I've found on the web), I get the following error message:

ZeroLink: unknown symbol '_kABGroupNameProperty'

Which I figure is telling me I've missed a definition somewhere, but i have imported the <AddressBook/AddressBook.h> header file as described in the API docs.

Any help would be greatly appreciated!

Here's the code:




#import <AddressBook/AddressBook.h>

[....]

-(id) init
{
[super init];

clients = [ [NSMutableArray alloc] initWithCapacity:1024 ];

ABAddressBook* book = [ ABAddressBook sharedAddressBook ];

ABSearchElement* se = [ ABGroup searchElementForProperty:kABGroupNameProperty
label:nil
key:nil
value:@"MyGroup"
comparison:kABEqual ];

NSArray* results = [ book recordsMatchingSearchElement: se ];

NSLog( [results description ] );

return( self );
}



Thanks in advance!
Chris
--
www.chrisblunt.com
Reply With Quote
  #2  
Old July 28th, 2005, 08:34 AM
Registered User
 
Join Date: Nov 2000
Posts: 948
Thanks: 0
Thanked 0 Times in 0 Posts
kainjow is on a distinguished road
Make sure you add the AddressBook.framework to your project. It's located at /System/Library/Frameworks/AddressBook.framework - just go to Project > Add to Project and select this framework.
Reply With Quote
  #3  
Old July 28th, 2005, 08:50 AM
Registered User
 
Join Date: Sep 2003
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
cbl2001 is on a distinguished road
hi that's worked, thanks! always the smallest of mistakes causing the biggest headaches!

Cheers,
Chris
--
www.chrisblunt.com
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 02:16 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.