Re: How to add a property to the address book?
Re: How to add a property to the address book?
- Subject: Re: How to add a property to the address book?
- From: Vince DeMarco <email@hidden>
- Date: Mon, 3 Mar 2003 18:48:18 -0800
On Monday, March 3, 2003, at 08:58 AM, email@hidden wrote:
Hi,
I am trying to add a property to the address book, but so far I have
drawn
a blank...
I am trying to use +addPropertiesAndTypes method on ABPerson, but it
requires that type is in a NSDictionary object, but the address book
expects an int (kABStringProperty = 0x2)
NSMutableDictionary *d= [NSMutableDictionary dictionary]
[d setObject:@"kABStringProperty" forKey:
@"com.mycompany.myStringProperty"];
[d setObject:@"kABDateProperty"
forKey:@"com.mycompany.myDateProperty"];
[ABPerson addPropertiesAndTypes d];
Can anyone tell me how I would go about doing this, using ints instead
of
@"" strings, for kABXXXProperty
NSDictionary *dict;
dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber
numberWithInt:kABStringProperty],@"com.mycompany.myStringProperty",nil,n
il];
if ([ABPerson addPropertiesAndTypes:dict] == YES){
NSLog(@"It worked");
}else{
NSLog(@"It failed");
}
_______________________________________________
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.