• 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: Enumerating Address Book properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Enumerating Address Book properties
      • From: Denis Stanton <email@hidden>
References: 
 >Re: Enumerating Address Book properties (From: Denis Stanton <email@hidden>)

  • Prev by Date: Re: Adding something to the current user's login items.
  • Next by Date: Re: Squared Ends in Textured Window
  • Previous by thread: Re: Enumerating Address Book properties
  • Next by thread: Re: Enumerating Address Book properties
  • Index(es):
    • Date
    • Thread