NSPredicateEditorRowTemplate and ANY predicate
NSPredicateEditorRowTemplate and ANY predicate
- Subject: NSPredicateEditorRowTemplate and ANY predicate
- From: Frédéric Testuz <email@hidden>
- Date: Tue, 22 Jul 2008 21:05:30 +0200
Hello,
Is it possible to prepare a row template for a NSPredicateEditor in IB
for a predicate like "ANY keyPath == 'aValue'" ?
Otherwise I found this : <http://developer.apple.com/samplecode/PhotoSearch/listing2.html
>
If I can't do it in IB, I think it will be the simplest solution :
- (NSPredicate *)predicateWithSubpredicates:(NSArray *)subpredicates
{ /* we only make NSComparisonPredicates */
NSComparisonPredicate *predicate = (NSComparisonPredicate *)[super
predicateWithSubpredicates:subpredicates];
/* construct an identical predicate, but add the
NSCaseInsensitivePredicateOption flag */
return [NSComparisonPredicate predicateWithLeftExpression:[predicate
leftExpression] rightExpression:[predicate rightExpression]
modifier:NSAnyPredicateModifier type:[predicate predicateOperatorType]
options:[predicate options]];
}
Thanks
Frédéric_______________________________________________
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