NSMetadataQueryDelegate Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in OS X v10.6 and later. |
| Companion guide | |
| Declared in | NSMetadata.h |
Overview
The NSMetadataQueryDelegate protocol defines the optional methods implemented by delegates of NSMetadataQuery objects.
Instance Methods
metadataQuery:replacementObjectForResultObject:
Implemented by the delegate to return a different object for a specific query result object.
Parameters
- query
The query that produced the result object to replace.
- result
The query result object to replace.
Return Value
Object that replaces the query result object.
Discussion
By default query result objects are instances of the NSMetadataItem class. By implementing this method, you can return an object of a different class type for the specified result object.
Availability
- Available in OS X v10.4 and later.
- Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSMetadata.hmetadataQuery:replacementValueForAttribute:value:
Implemented by the delegate to return a different value for a specific attribute.
Parameters
- query
The query that produced the result object with attribute.
- attribute
The attribute in question.
- attributeValue
The attribute value to replace.
Return Value
Object that replaces the value of attribute in the result object
Discussion
The delegate implementation of this method could convert specific query attribute values to other attribute values, for example, converting date object values to formatted strings for display.
Availability
- Available in OS X v10.4 and later.
- Available as part of an informal protocol prior to OS X v10.6.
Declared In
NSMetadata.h© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-10-12)