Reload a preference pane


/ Published in: Objective C
Save to your folder(s)

The preference pane that need to be reloaded must fork 'reload' with two arguments, then terminate System Preferences. In Cocoa, the fork is easily achieved with a NSTask. The first argument must be the bundle identifier of the preference pane to reload. The second argument must be the process identifier of the terminating application, i.e. System Preferences. In Cocoa, you can get it with [[NSProcessInfo processInfo] processIdentifier], which is equivalent to getpid().

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.