/ Published in: Objective C
If you're writing a preference pane and you'd like to exit back to the main System Preferences view, just use this code.
Expand |
Embed | Plain Text
NSAppleScript *script = [[NSAppleScript alloc] initWithSource:@"tell application \"System Preferences\" to set show all to true"]; [script executeAndReturnError:nil];
Comments
Subscribe to comments
You need to login to post a comment.

As a aside, you can also accomplish this by using the objective-c scripting bridge, but that requires linking to another framework as well as creating a .h file for the scripting definition library. Both of those make this solution more attractive, due to simplicity.