Re: Trouble using ANY operator in an NSArrayController search predicate
Re: Trouble using ANY operator in an NSArrayController search predicate
- Subject: Re: Trouble using ANY operator in an NSArrayController search predicate
- From: Michael Tsai <email@hidden>
- Date: Sat, 20 May 2006 10:09:52 -0400
On Saturday, May 20, 2006 8:02:59 AM Jim Correia <email@hidden>
wrote:
> In the operations section of the doc, it says:
>
> CONTAINS and IN serve both as aggregate operators and string
> operators, depending on the types of their arguments.
>
> The auto-generated test UI when you drag an entity over to IB uses
> predicates of the form "key contains[cd] $value" for the search field.
> Based on that, my working assumption is that it should work.
If you look at the operator type constants rather than the format string
grammar, you'll see that CONTAINS compiles down to IN with the LHS and
RHS swapped. And IN combined with ANY behaves as documented (LHS must be
a collection), which is to say that they won't do what you want.
--Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden