NSPredicateEditor query
NSPredicateEditor query
- Subject: NSPredicateEditor query
- From: Jonathan Mitchell <email@hidden>
- Date: Wed, 14 Dec 2016 10:08:03 +0000
I have an NSPredicateEditor configured to generate my queries.
I have two questions:
1. I want my users to be able to construct queries from a simple initial predicate.
Ideally I would like the initial predicate to operate on a single key path and look something like:
@"(self.fullName CONTAINS[cd] '')”
However I would also like the composite predicate row to be visible initially - This is the row that says “”Any / All of the following are true”;
The following works but always logs Warning - unable to find template matching predicate 1 == 1
@"(self.fullName CONTAINS[cd] '') AND (1 == 1)”
Is there a workaround for this?
2. The second query is connected.
I would also like to offer the ability to add additional composite predicate operators (Any/All).
The default UI doesn’t seem to implement this.
Is the solution simply to implement an action that takes the current predicate format, append an “AND ()” statement and regenerate the predicate?
Thanks
J
_______________________________________________
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