Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSPredicateMBS class.

NSPredicateMBS.Constructor(predicateFormat as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a new predicate by substituting the values in a given array into a format string and parsing the result.
Example
dim n as new NSPredicateMBS("kMDItemContentType=""com.apple.application-bundle""")
MsgBox n.predicateFormat

predicateFormat: The format string for the new predicate.
arguments: Optional, the arguments to substitute into predicateFormat. Values are substituted into predicateFormat in the order they appear in the array.

You get a new predicate by substituting the values in arguments into predicateFormat, and parsing the result.
For details of the format of the format string and of limitations on variable substitution, see Predicate Format String Syntax:
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html#//apple_ref/doc/uid/TP40001795

Available in Mac OS X v10.4 and later.

See also:

NSPredicateMBS.Constructor(predicateFormat as string, arguments() as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a new predicate by substituting the values in a given array into a format string and parsing the result.
Example
// we use one parameter here
dim s() as Variant
s.Append "com.apple.application-bundle"

dim n as new NSPredicateMBS("kMDItemContentType=%@", s)

// shows final string
MsgBox n.predicateFormat

predicateFormat: The format string for the new predicate.
arguments: Optional, the arguments to substitute into predicateFormat. Values are substituted into predicateFormat in the order they appear in the array.

You get a new predicate by substituting the values in arguments into predicateFormat, and parsing the result.
For details of the format of the format string and of limitations on variable substitution, see Predicate Format String Syntax:
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html#//apple_ref/doc/uid/TP40001795

Available in Mac OS X v10.4 and later.

See also:

NSPredicateMBS.Constructor(value as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and returns a predicate that always evaluates to a given value.
Example
dim n as new NSPredicateMBS(true)
MsgBox n.predicateFormat

See also:

NSPredicateMBS.description as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The descriptor for this event.
Example
dim args() as Variant
args.Append NSMetadataItemMBS.NSMetadataItemFSNameKey
dim pred as NSPredicateMBS = NSPredicateMBS.predicateWithFormat("%K LIKE '*'", args)
MsgBox pred.description

This is a text representation for debugging.

NSPredicateMBS.predicateFormat as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the receiver's format string.

The string returned by this method is not guaranteed to be the same as a string used to create the predicate.

NSPredicateMBS.Print

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 12.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Writes description for this event descriptor to the console.

You can see result in Console.app.

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


The biggest plugin in space...