| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in Mac OS X v10.6 and later. |
| Companion guide | |
| Declared in | NSMetadata.h |
| Related sample code |
The NSMetadataQueryDelegate protocol defines the optional methods implemented by delegates of NSMetadataQuery objects.
Implemented by the delegate to return a different object for a specific query result object.
- (id)metadataQuery:(NSMetadataQuery *)query replacementObjectForResultObject:(NSMetadataItem *)result
The query that produced the result object to replace.
The query result object to replace.
Object that replaces the query result object.
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.
NSMetadata.hImplemented by the delegate to return a different value for a specific attribute.
- (id)metadataQuery:(NSMetadataQuery *)query replacementValueForAttribute:(NSString *)attribute value:(id)attributeValue
The query that produced the result object with attribute.
The attribute in question.
The attribute value to replace.
Object that replaces the value of attribute in the result object
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.
NSMetadata.hLast updated: 2009-04-18