34,333
edits
Changes
no edit summary
<pre>
let query: NSMetadataQuery = notification.object as ! NSMetadataQuery
query.disableUpdates()
if query.resultCount == 1 {
let resultURL =
results[0].valueForAttribute(NSMetadataItemURLKey) as ! NSURL
document = MyDocument(fileURL: resultURL)
func metadataQueryDidFinishGathering(notification: NSNotification) -> Void
{
let query: NSMetadataQuery = notification.object as ! NSMetadataQuery
query.disableUpdates()
if query.resultCount == 1 {
let resultURL =
results[0].valueForAttribute(NSMetadataItemURLKey) as ! NSURL
document = MyDocument(fileURL: resultURL)