• 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
Address Book Helper code released to public domain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Address Book Helper code released to public domain


  • Subject: Address Book Helper code released to public domain
  • From: Joseph Jones <email@hidden>
  • Date: Mon, 29 Sep 2003 20:04:57 -0700
  • Resent-date: Mon, 29 Sep 2003 21:52:12 -0700
  • Resent-from: Joseph Jones <email@hidden>
  • Resent-message-id: <DF87497C-F2F2-11D7-A944-0003937519CE@jtechsoftworks. com>
  • Resent-to: cocoa Dev Dev <email@hidden>, Mac OSX Dev Dev <email@hidden>

Hi,

In our continuing effort to help the Mac OS X development community,
JTech Softworks, Inc. is proud to announce the release the source to a
small Address Book helper. This code is a set of interface extensions
to the ABMultiValue, ABRecord and ABPerson classes provided by the base
framework that make property access and writing easier and more "Cocoa"
like. Since they are interface extensions and not derivations, you only
work with an ABMultiValue, ABRecord or ABPerson object and call the
extended methods provided by this code.

A simple example of using these extensions:

ABAddressBook* book = [ABAddressBook sharedAddressBook];
ABPerson* person = [book me];

NSLog( [person fullName] );
NSLog( [person primaryEmail] );
NSLog( [NSString stringWithFormat:@"Work Email: %@", [person
workEmail]] );
NSLog( [NSString stringWithFormat:@"Home Email: %@", [person
homeEmail]] );
NSLog( [person primaryPhone] );
NSLog( [NSString stringWithFormat:@"Work Phone: %@", [person
workPhone]] );
NSLog( [NSString stringWithFormat:@"Home Phone: %@", [person
homePhone]] );

NSDictionary* primAddr = [person primaryAddress];

if ( primAddr )
{
NSLog ( [person streetFromAddress:primAddr] );
NSLog ( [person cityFromAddress:primAddr] );
NSLog ( [person stateFromAddress:primAddr] );
NSLog ( [person zipFromAddress:primAddr] );
NSLog ( [person countryFromAddress:primAddr] );
}

The code, plus a short example driver that includes the code above, can
be retrieved from the following URL:

http://www.jtechsoftworks.com/samples/JTAddressBook.sit

The download contains a full Cocoa Tool app that is both an example of
using the code as well a a quick test tool.

I hope people find this code useful. If so, a short note of recognition
in your application would be cool. :-)

If you extend the code or fix any bugs in it, please make sure you send
the changes to me so I can keep my source base up.

Thank you,
Joseph Jones
JTech Softworks, Inc. - http://www.jtechsoftworks.com


Thank you,
Joseph Jones
JTech Softworks, Inc. - http://www.jtechsoftworks.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Address Book Helper code released to public domain
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: Re: Cocoa graphics speed
  • Next by Date: ANN: Address Book helper library
  • Previous by thread: Re: Address Book Helper code released to public domain
  • Next by thread: Re: Address Book Helper code released to public domain
  • Index(es):
    • Date
    • Thread