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: email@hidden
- Date: Tue, 4 Mar 2003 09:46:49 +0000
Hi,
This is the code I am using:
NSMutableDictionary *d= [NSMutableDictionary dictionary];
[d setObject:@"kABStringProperty" forKey:
@"com.mycompany.myStringProperty"];
[d setObject:@"kABDateProperty" forKey:@"com.mycompany.myDateProperty"];
NSLog(@"Before Add");
[ABPerson addPropertiesAndTypes: d];
NSLog(@"After add");
and this is the output I am getting...
2003-03-03 22:52:55.010 addresses[674] Before Add
2003-03-03 22:52:55.036 addresses[674]
-[ABAddressBook_doAddPropertiesAndTypes:needsReadWriteMode:registerDataTypes:]
mkDataType for com.mycompany.myStringProperty not recognized
2003-03-03 22:52:55.037 addresses[674]
-[ABAddressBook_doAddPropertiesAndTypes:needsReadWriteMode:registerDataTypes:]
mkDataType for com.mycompany.myDateProperty not recognized
2003-03-03 22:52:55.130 addresses[674] After add
It seems to be complaining about needsReadWriteMode? I don't know how to
set read write mode for the address book?
John.
Denis Stanton
<denisstanton To: email@hidden
@mac.com> cc: email@hidden
Subject: Re: How to add a property to the address book?
04/03/2003
08:52
John
As I understand it, when you add a new property it must be of one of
the defined 14 types (7 single-value data types and 7 multi-value).
So your code below to create two new properties, one to hold a string
and one to hold a date looks good.
Are you saying you want to add a property that is not a string, not a
date, not and integer, not data, etc. ?
Denis
On Tuesday, March 4, 2003, at 05: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
>
Thanks.
>
John.
>
_______________________________________________
>
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.
>
>
Denis Stanton
email@hidden
Home: +64 9 533 0391
mobile: +64 21 1433622
_______________________________________________
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.