Re: Close System Preferences programmatically
Re: Close System Preferences programmatically
- Subject: Re: Close System Preferences programmatically
- From: Dave DeLong <email@hidden>
- Date: Tue, 04 Jan 2011 14:14:39 -0800
Another option would be to have your preference pane launch a little installer that won't proceed until the user quits System Preferences. Something like "In order to uninstall MyAwesomeFoo, please quit System Preferences". Then wait until the app quits, then dismiss the dialog and proceed. You might even be nice and have a "Quit it for me" button, that does the AppleScript thing.
Dave
On Jan 4, 2011, at 2:11 PM, Peter Lübke wrote:
> Though almost everybody seems to disagree you should do something like this here some ideas:
>
> - If you want to press the "Show All"- or "Back"- button, you could do this using the Accessibility API; take a look at Apple's "Accessibility Inspector" app.
>
> - If you really want System Preferences to quit, you could use NSAppleScript and do something like:
> tell application "System Preferences" to quit
> You can do the same using AppleEvents.
>
> If your app didn't open System Preferences programmatically before, I'd strongly suggest you ask the user if quitting is ok.
>
> Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden