Question about predicates and list properties.
Question about predicates and list properties.
- Subject: Question about predicates and list properties.
- From: Graham Cox <email@hidden>
- Date: Wed, 26 May 2010 23:39:00 +1000
I have a property 'categories' of an object that returns a list (an array) of objects, which in turn have a property 'name'.
Can I set up a NSPredicate that can match a string against any name in this list? How?
In IB I set the left hand side to 'categories.name' but I get the error that "Can't do a substring operation with something that isn't a string", which on reflection makes sense.
I could add a property that does return a single string by combining all the names into a comma delimited list, but I was hoping there might be a way to define such a predicate without resorting to that (and also such an approach loses the ability to correctly match 'begins with', 'ends with' and so on).
--Graham
_______________________________________________
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