10.7では動作しますが、10.8では動作しません。マウンテンライオンでこれをどのように機能させるには?Finderで表示されない10.8
-(IBAction)showTargetInFinder:(id)sender
{
NSString *linkPath = [targetField stringValue];
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
[ws selectFile:linkPath inFileViewerRootedAtPath:nil];
}
のURLの代わりにパスがあるので、あなたは、ペドロビエラのソリューションで行く必要があります一般的な方法ですが、好奇心のためだけに試してみるべきもう一つの方法は、 'nil'ではなくファイルビューアのルートに' @ ""を使ってパスベースの方法を使うことです。 [ドキュメントの説明](http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWorkspace/selectFile: inFileViewerRootedAtPath :)は古風なものですが、要点は '@" "がより有用なルート値であるということです。 –