MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSPredicateMBS class

class, iCloud, MBS Lion Plugin (NSMetadata), class NSPredicateMBS,
Plugin version: 11.3, Mac: Yes, Win: No, Linux: No, Console & Web: Yes, Feedback.

Function: The NSPredicate class is used to define logical conditions used to constrain a search either for a fetch or for in-memory filtering.
You use predicates to represent logical conditions, used for describing objects in persistent stores and in-memory filtering of objects. Although it is common to create predicates directly from instances of NSComparisonPredicate, NSCompoundPredicate, and NSExpression, you often create predicates from a format string which is parsed by the class methods on NSPredicate. Examples of predicate format strings include:

  • Simple comparisons, such as grade == "7" or firstName like "Shaffiq"
  • Case and diacritic insensitive lookups, such as name contains[cd] "itroen"
  • Logical operations, such as (firstName like "Mark") OR (lastName like "Adderley")
  • In Mac OS X v10.5 and later, you can create €œbetween€ predicates such as date between {$YESTERDAY, $TOMORROW}.

You can create predicates for relationships, such as:

  • group.name like "work*"
  • ALL children.age > 12
  • ANY children.age > 12

You can create predicates for operations, such as @sum.items.price < 1000. For a complete syntax reference, refer to the Predicate Programming Guide:

Sub classes:

Some methods using this class:

Some properties using for this class:

Some events for this class:

Some examples which use this class:

The items on this page are in the following plugins: MBS Lion Plugin.

NSPopUpButtonMBS   -   NSPrinterMBS

MBS Real Studio Plugins