Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

NSMetadataQueryMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Initializes the NSMetadataQuery object.

Feedback, Comments & Corrections

NSMetadataQueryMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

NSMetadataQueryMBS.disableUpdates
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Disables updates to the query results.
Notes: You should invoke this method before iterating over query results that could change due to live updates.

Feedback, Comments & Corrections

NSMetadataQueryMBS.enableUpdates
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Enables updates to the query results.
Notes: You should invoke this method after you're done iterating over the query results.

Feedback, Comments & Corrections

NSMetadataQueryMBS.groupedResults as NSMetadataQueryResultGroupMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns an array containing hierarchical groups of query results based on the receiver's grouping attributes.

Feedback, Comments & Corrections

NSMetadataQueryMBS.groupingAttributes as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns the receiver's grouping attributes.

Feedback, Comments & Corrections

NSMetadataQueryMBS.indexOfResult(item as NSMetadataItemMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns the index of a query result object in the receiver's results array.

Feedback, Comments & Corrections

NSMetadataQueryMBS.isGathering as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the receiver is in the initial gathering phase of the query.
Notes: Returns true when the query is in the initial gathering phase; false otherwise.

Feedback, Comments & Corrections

NSMetadataQueryMBS.isStarted as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the receiver has started the query.
Notes: Returns true when the receiver has executed the startQuery method; false otherwise.

Feedback, Comments & Corrections

NSMetadataQueryMBS.isStopped as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the receiver has stopped the query.
Notes: Returns true when the receiver has stopped the query, false otherwise.

Feedback, Comments & Corrections

NSMetadataQueryMBS.notificationBatchingInterval as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: The interval that the receiver provides notification of updated query results.
Notes:
in seconds.
(Read and Write computed property)

Feedback, Comments & Corrections

NSMetadataQueryMBS.predicate as NSPredicateMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: The predicate used by the receiver to filter the query results.
Example:
dim m as new NSMetadataQueryMBS
m.predicate = NSPredicateMBS.predicateWithFormat("kMDItemContentType=""com.apple.application-bundle""")
Notes:
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)

Feedback, Comments & Corrections

NSMetadataQueryMBS.resultAtIndex(index as Integer) as NSMetadataItemMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns the query result at a specific index.
Notes:
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.

Feedback, Comments & Corrections

NSMetadataQueryMBS.resultCount as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns the number of results returned by the receiver.
Notes: For performance reasons, you should use this method, rather than invoking count on results array.

Feedback, Comments & Corrections

NSMetadataQueryMBS.results as NSMetadataItemMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns an array containing the result objects for the receiver.
Notes: 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.

Feedback, Comments & Corrections

NSMetadataQueryMBS.searchScopes as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns an array containing the receiver's search scopes.
Notes: The array can contain strings that represent file system directories or the search scopes specified in Constants. An empty array indicates that there is no limitation on where the receiver searches.

Feedback, Comments & Corrections

NSMetadataQueryMBS.setGroupingAttributes(attributeNames() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the receiver's grouping attributes to specific attribute names.
Notes:
Invoking this method on a receiver while it's running a query, stops the query and discards current results, and immediately starts a new query.
Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSMetadataQueryMBS.setSearchScopes(folders() as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 12.1 Yes No No Yes, macOS only No
Function: Restrict the search scope of the receiver.
Notes: You can pass paths as folderitem.

See also:

Feedback, Comments & Corrections

NSMetadataQueryMBS.setSearchScopes(paths() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 12.1 Yes No No Yes, macOS only No
Function: Restrict the search scope of the receiver.
Notes: You can pass paths as strings and with the string array also the special scope strings from this class.

See also:

Feedback, Comments & Corrections

NSMetadataQueryMBS.setSearchScopes(paths() as string, folders() as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Restrict the search scope of the receiver.
Example:
dim m as new NSMetadataQueryMBS
dim paths() as string
dim folders() as FolderItem

// you can specify where to search either by path or by FolderItem
'paths.Append "/Applications"
folders.Append SpecialFolder.Applications

m.setSearchScopes paths, folders
Notes: You can pass paths as strings, paths as folderitem and with the string array also the special scope strings from this class.

See also:

Feedback, Comments & Corrections

NSMetadataQueryMBS.setSortDescriptor(sortDescriptor as NSSortDescriptorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the sort descriptors to be used by the receiver.
Example:
dim m as new NSMetadataQueryMBS
m.setSortDescriptor NSSortDescriptorMBS.sortDescriptorWithKey(NSMetadataItemMBS.NSMetadataItemDisplayNameKey, true)
Notes: Invoking this method on the receiver running a query causes the existing query to stop, all current results are discarded, and a new query is started immediately.

Feedback, Comments & Corrections

NSMetadataQueryMBS.setSortDescriptors(sortDescriptors() as NSSortDescriptorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Sets the sort descriptors to be used by the receiver.
Notes: Invoking this method on the receiver running a query causes the existing query to stop, all current results are discarded, and a new query is started immediately.

Feedback, Comments & Corrections

NSMetadataQueryMBS.sortDescriptors as NSSortDescriptorMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Returns an array containing the receiver's sort descriptors.
Notes: Available in Mac OS X v10.4 and later.

Feedback, Comments & Corrections

NSMetadataQueryMBS.startQuery as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Attempts to start the query.
Notes:
Returns true when successful; false otherwise.

A query can't be started if the receiver is already running a query or no predicate has been specified.

Feedback, Comments & Corrections

NSMetadataQueryMBS.stopQuery
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method iCloud MBS MacCloud Plugin 11.3 Yes No No Yes, macOS only No
Function: Stops the receiver's current query from gathering any further results.
Notes:
The receiver first completes gathering any unprocessed results. If a query is stopped before the gathering phase finishes, it will not post an NSMetadataQueryDidStartGatheringNotification notification.

You would call this function to stop a query that is generating too many results to be useful but still want to access the available results. If the receiver is sent a startQuery message after performing this method, the existing results are discarded.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo Plugins