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

Re: Address Book Helper code released to public domain


  • Subject: Re: Address Book Helper code released to public domain
  • From: Vince DeMarco <email@hidden>
  • Date: Tue, 30 Sep 2003 07:53:39 -0700

On Sep 29, 2003, at 8:04 PM, Joseph Jones wrote:

> 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]] );
>

This is great, but if i have 2 work or hone email addresses which one
does it get???

> 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
_______________________________________________
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: Joseph Jones <email@hidden>
References: 
 >Address Book Helper code released to public domain (From: Joseph Jones <email@hidden>)

  • Prev by Date: Getting the User/Owner of another process
  • Next by Date: Problem with drag out of NSOutlineView
  • Previous by thread: Address Book Helper code released to public domain
  • Next by thread: Re: Address Book Helper code released to public domain
  • Index(es):
    • Date
    • Thread