Platforms to show: All Mac Windows Linux Cross-Platform

NSCompoundPredicateMBS class

Super class: NSPredicateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
NSCompoundPredicate is a subclass of NSPredicate used to represent logical "gate" operations (AND/OR/NOT) and comparison operations.
Example
dim n1 as NSPredicateMBS = NSPredicateMBS.predicateWithValue(true)
dim n2 as NSPredicateMBS = NSPredicateMBS.predicateWithValue(false)

dim n as NSPredicateMBS = NSCompoundPredicateMBS.orPredicateWithSubpredicates(array(n1,n2))
MsgBox n.predicateFormat

Comparison operations are based on two expressions, as represented by instances of the NSExpression class. Expressions are created for constant values, key paths, and so on.

In Mac OS X v10.5 and later and in iOS, you can use NSCompoundPredicate to create an AND or OR compound predicate (but not a NOT compound predicate) using an array with 0, 1, or more elements:

  • An AND predicate with no subpredicates evaluates to TRUE.
  • An OR predicate with no subpredicates evaluates to FALSE.
  • A compound predicate with one or more subpredicates evaluates to the truth of its subpredicates.
Subclass of the NSPredicateMBS class.

Compound Predicate Types

Constant Value Description
kAnd 1 A logical AND predicate.
kNot 0 A logical NOT predicate.
kOR 2 A logical OR predicate.

Super class NSPredicateMBS

This class has no sub classes.

Some examples using this class:

Blog Entries


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


NSComparisonPredicateMBS   -   NSControlMBS


The biggest plugin in space...