Re: Enumerating Address Book properties
Re: Enumerating Address Book properties
- Subject: Re: Enumerating Address Book properties
- From: Tito Ciuro <email@hidden>
- Date: Sun, 23 Feb 2003 03:13:05 +0100
Hi Denis,
On Saturday, February 22, 2003, at 10:44 PM, Denis Stanton wrote:
This still leaves me with a problem regarding custom properties.
Inside Mac OS X tells me that programs can define entirely new
properties. These won't be defined in ABGlobals,
That's right. ABGlobals defines some standard properties, but of course
it cannot define every single property one will ever need. This is why
the AddressBook framework keeps track of non-standard properties added
by other developers.
and I assume +(NSArray *)properties; won't return them, so how will I
know what to ask for in valueForProperty:(NSString *)property ? Of
course if my program adds new properties (this is an important part of
the application I'm writing) I can keep track of them somewhere, but
this won't allow me to 'discover' properties inserted by other Address
Book users.
Am I right in thinking that + (NSArray *)properties; won't tell me
about any non-standard properties
Nope. Wrong assumption. :)
When you invoke + (NSArray *)properties, *all* properties defined will
be returned, standard properties + custom ones. Just traverse the
array, and keep the properties with non-nil values.
Hope this helps,
-- Tito
_______________________________________________
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.