Re: Question about predicates and list properties.
Re: Question about predicates and list properties.
- Subject: Re: Question about predicates and list properties.
- From: Keary Suska <email@hidden>
- Date: Wed, 26 May 2010 09:25:06 -0600
On May 26, 2010, at 8:42 AM, Graham Cox wrote:
>
> On 27/05/2010, at 12:35 AM, Keary Suska wrote:
>
>> Not enough info: are you using Core Data, or a simple modeled relationship? I assume the issue is about traversing a relationship--otherwise the solution is trivial...
>
>
> No, it's a simple 'to many' property in my own model, not using Core Data. If it's trivial I can't find the solution - I have tried many things hinted at by the predicates guide. I am tired having worked a 14 hour day and counting, so perhaps I just need a rest to see the wood for the trees...
>
> I have a list of objects. Each object has a 'categories' property, which is another 'to many' property, i.e. a list. Each category has a simple 'name' property.
>
> I desire to match a string I enter to any of the categories.name strings in the list using equals, begins with, ends with, contains. I'm setting up the predicate editor in IB, but I can't see any way to use the aggregating predicate syntax anywhere there and when I attempt it I get a runtime error (e.g. no value for key 'ANY categories').
>
> Perhaps it's a limitation of IB that more complex predicate editor row templates are not available?
If I were to point a finger, I would point it at the predicate editor, although I recall that even in code relationship-traversing predicates can be temperamental.
Anyway, AFAIK, there is no way to specify aggregate expressions in IB. Have you tried in code, using NSAnyPredicateModifier?
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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