On Tue, Jul 15, 2008 at 11:48 AM, Niklas Saers <[EMAIL PROTECTED]> wrote:
> Hi, > I've implemented a little tree through my class Node that contains the > properties NSString* name and NSMutableArray *subnodes > > I'd love to say something like "Give me the nodes that have a grand-father > named Balbo Baggins and father named Ponto Baggins" (should be Rosa and Polo > Baggins) How do I express this with keypaths? I don't believe you can. Keypaths can contain certain expressions such as @max or @sum but not arbitrary relations. If you were using Core Data, expressing your familial relations as to-many relationships with inverses, it would be straightforward to achieve the query you want (and indeed, to create a GUI for that query). You would get an NSSet of the results which you could display in a table with just a single column for name, or whatever other presentation suited you best. Hamish _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]