image
image

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

Reply
 
Thread Tools
  #1  
Old July 18th, 2008, 07:04 AM
Registered User
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
amax is on a distinguished road
Adding Members to group in addressook with cocoa application

Hello,
I want to add groups to address book. i am able to add groupName to addressbook using KABGroupName Property. but I am not able to add members to group.can any one tell me how can i add members to Newly created group ?

or I am trying to add Members to existig group also. I have implemented following code.
ABAddressBook*book = [ABAddressBook SharedAddressBook];
ABPerson *person = [[[ABPerson alloc] init] autorelease];
ABGroup *aGroup = [[[ABGroup alloc] init] autorelease];
aGRoup = [book recordForUniqueID:"here i am writting UID of that group"];

[aPerson setValue @"joy" forProperty:kABFirstNameProperty];
[aPerson setValue @"nods" forProperty:kAbLastNameProperty];

[aGroup addMember:aPerson];
[book addRecord:aGroup];
[book save];

is there anything wrong with code?
if yes ,please sggest me code for adding the members to group;
i am not getting it.

Thank You..

amax.
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 06:47 AM.


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.