Re: Addressbook api
Re: Addressbook api
- Subject: Re: Addressbook api
- From: Henri Lamiraux <email@hidden>
- Date: Thu, 5 Sep 2002 13:38:40 -0700
NSNumber *intProperty = [NSNumber numberWithInt: kABIntegerProperty];
NSDictionary *newProperty = [NSDictionary dictionaryWithObjectsAndKeys:
intProperty, kMyProperty, nil, nil];
int numberOfPropertiesAdded = [ABPerson addPropertiesAndTypes:
newProperty];
if (numberOfPropertiesAdded != 1) { // I added one property
NSLog(@"Something went wrong");
}
Henri Lamiraux
Engineering Manager
User Interface Tools Group
Apple
On Thursday, September 5, 2002, at 12:55 PM, Mark Steinberg wrote:
>
Does anyone have any examples of adding a property to the addressbook?
>
>
This is not the way to do it ;-)
>
>
ABPerson *person;
>
int theInteger = 0;
>
person = [[ABPerson alloc] init];
>
NSMutableDictionary *addedProperties = [[NSMutableDictionary
>
alloc]
>
init];
>
>
[addedProperties setObject: kABIntegerProperty forKey:kPMOid];
>
[ABPerson addPropertiesAndTypes:addedProperties];
>
[person setValue:theInteger forProperty:kPMOid];
>
>
I know this isn't right but I dont' know how to pass kABIntegerProperty
>
so that it gets added to the dictionary.
>
I also know that setValue:theInteger isn't right either but if the
>
dictionary is expecting and integer how can I pass it?
>
>
TIA
>
>
Mark
>
--
>
Mark Steinberg
>
Textile Technologies LLC
>
http://www.textiletech.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.
_______________________________________________
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.