AddressBook (Repost from objc-language)
AddressBook (Repost from objc-language)
- Subject: AddressBook (Repost from objc-language)
- From: App Dev <email@hidden>
- Date: Thu, 09 Oct 2008 17:58:34 +0200
Hi!
I am reposting this as I mistakenly sent it to objc-language...oops.
Documentation for ABAddressBook exposes a new method for 10.5:
[ABAddressBook addressBook].(ABAddressBook Class Reference)
Doc says that it "Returns a new instance of ABAddressBook".
As I am in need of using a "private" addressbook for a project, I
thought this would be perfect.
With a quick test I attempted:
...
ab = [ABAddressBook addressBook];
//ab = [ABAddressBook sharedAddressBook];
ABPerson *aPerson = [[[ABPerson alloc] init] autorelease];
[aPerson setValue:@"Remy" forProperty:kABFirstNameProperty];
[aPerson setValue:@"Lebeau" forProperty:kABLastNameProperty];
[ab addRecord:aPerson];
[ab save];
...
What I found out was that both sharedAddressBook and addressBook
accomplished the same thing, that is adding a new person into my
existing user addressbook, as opposed to generating a new addressbook...
Did I misunderstand the documentation?
TIA!
Jeremy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden