• 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: email@hidden
  • Date: Tue, 4 Mar 2003 10:02:02 +0000

D'oh... of course, I didn't think to try that...

Thanks.
John.
----- Forwarded by John MacNamara/EON/ie on 04/03/2003 10:01 -----

Vince DeMarco
<email@hidden> To: email@hidden
Sent by: cc: email@hidden
cocoa-dev-admin@lists Subject: Re: How to add a property to the address book?
.apple.com


04/03/2003 02:48






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.
_______________________________________________
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.

  • Prev by Date: Re: How to add a property to the address book?
  • Next by Date: Should I copy the "/.vol" folder?
  • Previous by thread: Re: How to add a property to the address book?
  • Next by thread: Custom Cells in NSTableView
  • Index(es):
    • Date
    • Thread