में काम नहीं कर रहा यह 10.7 में काम करता है लेकिन 10.8 में नहीं। माउंटेन शेर में काम करने के लिए मैं इसे कैसे प्राप्त करूं?खोजक में दिखाएं 10.8
-(IBAction)showTargetInFinder:(id)sender
{
NSString *linkPath = [targetField stringValue];
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
[ws selectFile:linkPath inFileViewerRootedAtPath:nil];
}
आप, पेड्रो विएरा समाधान के साथ जाना चाहिए के बाद से रास्तों के बजाय यूआरएल है आम तौर पर आगे बढ़ने का तरीका, लेकिन कोशिश करने के लिए एक और चीज (अगर केवल जिज्ञासा के लिए) पथ-आधारित विधि का उपयोग 'n" ''' '' '' '' '' '' '' ''' 'के साथ फाइल व्यूअर रूट के लिए करना होगा। [प्रलेखन की व्याख्या] (http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWorkspace/selectFile: inFileViewerRootedAtPath :) बल्कि पुरातन है, लेकिन यह है कि '@ "" 'अधिक उपयोगी रूट मान है। –