Newbie Confused by ABMutableMultiValue and how to store emails and phone numbers using them.
Newbie Confused by ABMutableMultiValue and how to store emails and phone numbers using them.
- Subject: Newbie Confused by ABMutableMultiValue and how to store emails and phone numbers using them.
- From: Papa-Raboon <email@hidden>
- Date: Sat, 28 Jun 2008 14:11:26 +0100
Hi again Cocoa geniuses,I am trying to get my head around the basics of the
AddressBook
framework. It seems there are not many examples of how to set/store email
addresses and phone numbers in the addressbook. I understand I need to
use ABMutableMultiValue to set my phone numbers and email addresses as
I do the actual fields of the addresses (home or work) but I can't
seem to figure out how it's done for either email addresses or phone
numbers.
I have this to set the home address:
homeAddr = [NSMutableDictionary dictionary];
[homeAddr setValue:myStreet forKey:kABAddressStreetKey];
[homeAddr setValue:myCity forKey:kABAddressCityKey];
[homeAddr setValue:myCounty forKey:kABAddressStateKey];
[homeAddr setValue:myPostcode forKey:kABAddressZIPKey];
multivalue = [[ABMutableMultiValue alloc] init];
[multivalue addValue:homeAddr withLabel:kABAddressHomeLabel];
[person setValue:multivalue forProperty:kABAddressProperty];
[multivalue release];
This all seems to work beautifully but I can't for the life of me
figure out how to do the same for the email addresses and telephone
numbers.
If anyone knows how to do this would it be possible to get the heads up from
someone please
as it's driving e nuts. As a complete newbie to Cocoa, MVC and OOP I
understand examples better
than verbose descriptions and that's where Apple's documentation seems a
little sparse :-)
Cheers
Paul Randall
_______________________________________________
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