Thank you Roland, and Luke!
I got it...thank you for your pointers!
ABRecordRef group = CFArrayGetValueAtIndex(grpval, i);
NSString *groupName = (NSString *)ABRecordCopyCompositeName(group);
This works, finally...
Thank you again!
James
On 2009/7/13, at 下午 3:18, Roland King wrote:
Well they
no problem. Don't forget about the ownership of that groupName string,
the ABRecordCopyCompositeName() returns, it's a copy, you have to
CFRelease it or release the NSString.
Personally I'd have used the ABRecordCopyValue() method myself with the
kABGroupNameProperty because it's more explicit
Hi Roland, Luke...
Thank you for your pointers...
the following finally works...
ABRecordRef group = CFArrayGetValueAtIndex(grpval, i);
NSString *groupName = (NSString *)ABRecordCopyCompositeName(group);
Thank you for your pointers and help...sincerely appreciated!
James
_
Well they aren't strings, they are some kind of opaque type which
represents a group. So you can't find it using CFArrayContainsValue with
a String. The name is a property of the Group object which is returned.
You'll have to iterate the array, get the property for each group which
is the name
Thank you Roland.
Actually, I tried that function...but there is a problem that I can't
figure out.
the following is my code segment...
ABAddressBookRef addressBook=ABAddressBookCreate();
CFArrayRef grpval= ABAddressBookCopyArrayOfAllGroups(addressBook);
CFIndex groupCount = ABAd
Ditto that.
Luke
Sent from my iPhone.
On Jul 12, 2009, at 10:15 PM, Roland King wrote:
ABAddressBookCopyArrayOfAllGroups()?
James Lin wrote:
Hi,
Sorry I didn't frame my question more clearly...
The part I am having trouble with is finding out if a "group name"
already exists in the add
ABAddressBookCopyArrayOfAllGroups()?
James Lin wrote:
Hi,
Sorry I didn't frame my question more clearly...
The part I am having trouble with is finding out if a "group name"
already exists in the addressbook,
is there a way to do this? the ABGroup documentation has no function
that allo
Hi,
Sorry I didn't frame my question more clearly...
The part I am having trouble with is finding out if a "group name"
already exists in the addressbook,
is there a way to do this? the ABGroup documentation has no function
that allows this...
any suggestions?
Thank you in advance...
The group doesn't have a name when you create it. Try setting the name
after creation rather than getting it.
Luke
Sent from my iPhone.
On Jul 11, 2009, at 12:50 AM, James Lin wrote:
Hi all,
Anyone familiar with the Addressbook framework?
I can't seem to be able to add a "group" into the
Hi all,
Anyone familiar with the Addressbook framework?
I can't seem to be able to add a "group" into the addressbook only ONCE.
if i use ABRecordRef group = ABGroupCreate(); to get a handle on group,
calling NSString *groupName = (NSString
*)ABRecordCopyCompositeName(group);
returns a NUL
10 matches
Mail list logo