• 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: Addressbook api
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Addressbook api


  • Subject: Re: Addressbook api
  • From: Mark Steinberg <email@hidden>
  • Date: Thu, 5 Sep 2002 22:36:59 -0400

Well, that previous email was embarrassing. I'm much closer now but I am still getting one runtime error I hope someone can help me with.

The Error:

2002-09-05 22:06:32.742 addressbooks[18372] -[ABAddressBook _doAddPropertiesAndTypes:needsReadWriteMode:registerDataTypes:] mkDataType for myNewID not recognized

The Code:

int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

int i=12345;
ABAddressBook *theBook;
theBook = [ABAddressBook sharedAddressBook];
NSMutableDictionary *addedProperties = [NSMutableDictionary dictionary];
[addedProperties setObject:@"kABIntegerProperty" forKey:@"myNewID"];
i = [ABPerson addPropertiesAndTypes:addedProperties];
if (i){
[theBook save];
ABPerson *person;

NSEnumerator *enumerator = [[theBook people] objectEnumerator];
while (person = [enumerator nextObject])
{
i++;
[person setValue:[[NSNumber numberWithInt:i] stringValue] forProperty: @"myNewID"];
}
[theBook save];
}
[pool release];
return 0;
}

TIA

Mark
On Thursday, September 5, 2002, at 03:55 PM, Mark Steinberg wrote:

Does anyone have any examples of adding a property to the addressbook?


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.


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

  • Follow-Ups:
    • Re: Addressbook api [SOLVED]
      • From: Mark Steinberg <email@hidden>
References: 
 >Addressbook api (From: Mark Steinberg <email@hidden>)

  • Prev by Date: Re: Global notification when front process changes
  • Next by Date: Re: Addressbook api [SOLVED]
  • Previous by thread: Re: Addressbook api
  • Next by thread: Re: Addressbook api [SOLVED]
  • Index(es):
    • Date
    • Thread