• 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: Group Identity Programming [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Group Identity Programming [SOLVED]


  • Subject: Re: Group Identity Programming [SOLVED]
  • From: Jessica Billings <email@hidden>
  • Date: Tue, 12 May 2009 13:29:40 -0400

Just wanted to say thanks for the help. Your solution worked. :)

Jessica

>CBGroupIdentity is a subclass of CBIdentity.  So in the NSArray of
>CBIdentity items returned from the identity picker, you test whether
>each item is a CBGroupIdentity or not using the normal Objective-C
>mechanism:

> [someItem isKindOfClass:CBGroupIdentity]

>Once you've identified a CBGroupIdentity, then type-cast it to
>(CBGroupIdentity*).  Then test whether the CBIdentity of the current
>user is a member of that group using the -members method and
>searching the resulting NSArray.  The search should be recursive,
>since I saw nothing prohibiting nested membership, only a prohibition
>against circular membership.

>Of course, if the array of CBIdentity's from the identity picker
>doesn't contain any groups, then the user isn't going to be a member
>of any of them, and you search the identity picker's NSArray for
>CBIdentity presence.  If that sounds like a recursive search of a
>group's -members NSArray, it is.

>To me, the problem doesn't seem to have anything to do with group
>identity per se.  It seems to hinge entirely on the subclass/
>superclass relationship, and identifying specific subclass types.

>It's possible I've made an error in the above.  I only spent a few
>minutes reading the class docs and Identity Services Programming
>Guide, and without looking any further, this seems like the simplest
>thing that might work.

>  -- GG
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: How to know CD Driver type
  • Next by Date: Changing name of newly created NSDocument (instead of 'Untitled i')
  • Previous by thread: Re: [iPhone] Getting an UIImageView to display under a UITableView
  • Next by thread: Changing name of newly created NSDocument (instead of 'Untitled i')
  • Index(es):
    • Date
    • Thread