Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSMetadataQueryMBS class.

NSMetadataQueryMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes the NSMetadataQuery object.

NSMetadataQueryMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The destructor.

NSMetadataQueryMBS.disableUpdates

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Disables updates to the query results.

You should invoke this method before iterating over query results that could change due to live updates.

NSMetadataQueryMBS.enableUpdates

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Enables updates to the query results.

You should invoke this method after you're done iterating over the query results.

NSMetadataQueryMBS.groupedResults as NSMetadataQueryResultGroupMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array containing hierarchical groups of query results based on the receiver's grouping attributes.

NSMetadataQueryMBS.groupingAttributes 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 grouping attributes.

NSMetadataQueryMBS.indexOfResult(item as NSMetadataItemMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the index of a query result object in the receiver's results array.

NSMetadataQueryMBS.isGathering as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether the receiver is in the initial gathering phase of the query.

Returns true when the query is in the initial gathering phase; false otherwise.

NSMetadataQueryMBS.isStarted as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether the receiver has started the query.

Returns true when the receiver has executed the startQuery method; false otherwise.

NSMetadataQueryMBS.isStopped as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether the receiver has stopped the query.

Returns true when the receiver has stopped the query, false otherwise.

NSMetadataQueryMBS.notificationBatchingInterval as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The interval that the receiver provides notification of updated query results.

in seconds.
(Read and Write computed property)

NSMetadataQueryMBS.predicate as NSPredicateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The predicate used by the receiver to filter the query results.
Example
Var m as new NSMetadataQueryMBS
m.predicate = NSPredicateMBS.predicateWithFormat("kMDItemContentType=""com.apple.application-bundle""")

Setting the predicate on a receiver running a query causes the existing query to stop, all current results are discarded, and a new query is started immediately.
(Read and Write computed property)

NSMetadataQueryMBS.resultAtIndex(index as Integer) as NSMetadataItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the query result at a specific index.

index: Index of the desired result in the query result array.
Returns query result at the position specified by index.

For performance reasons, you should use this method when retrieving a specific result, rather than they array returned by results.

NSMetadataQueryMBS.resultCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the number of results returned by the receiver.

For performance reasons, you should use this method, rather than invoking count on results array.

NSMetadataQueryMBS.results as NSMetadataItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method iCloud MBS MacCloud Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array containing the result objects for the receiver.

The results array is a proxy object that is primarily intended for use with Cocoa bindings. While it is possible to copy the proxy array and receive a "snapshot" of the complete current query results, it is generally not recommended due to performance and memory issues. To access individual result array elements you should instead use the resultCount and resultAtIndex methods.

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


The biggest plugin in space...