• 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: How to add a property to the address book?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >How to add a property to the address book? (From: email@hidden)

  • Prev by Date: Image Filtering Services
  • Next by Date: Re: Creating an alias
  • Previous by thread: Re: How to add a property to the address book?
  • Next by thread: Re: How to add a property to the address book?
  • Index(es):
    • Date
    • Thread