Re: Group Identity Programming [SOLVED]
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