• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AddressBook (Repost from objc-language)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: [NSApp stop:]
  • Next by Date: Re: Finder Crashes on File Open
  • Previous by thread: Re: [NSApp stop:]
  • Next by thread: NSDraggingSource's - (void)draggedImage:begatAt: method
  • Index(es):
    • Date
    • Thread