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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to