• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSPredicateEditorRowTemplate and ANY predicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSPredicateEditorRowTemplate and ANY predicate
      • From: Peter Ammon <email@hidden>
  • Prev by Date: Re: Avoiding mutual retain cycles
  • Next by Date: Help with "Messages without a matching method signature..." issue
  • Previous by thread: GetDblTime, 64-bit, and cocoa
  • Next by thread: Re: NSPredicateEditorRowTemplate and ANY predicate
  • Index(es):
    • Date
    • Thread