Re: Close System Preferences programmatically

2011-01-04 Thread Peter Lübke
Am 04.01.2011 um 23:38 schrieb eveningnick eveningnick: - 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. Peter, could you hint me on how to do it using App

Re: Close System Preferences programmatically

2011-01-04 Thread Kyle Sluder
2011/1/4 eveningnick eveningnick : >> - 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. > > Peter, could you hint me on how to do it using AppleEvents? > >

Re: Close System Preferences programmatically

2011-01-04 Thread Murat Konar
Leaving aside for the moment the wisdom of all this... Preference panes run in the same process as the System Preferences application. That means they can directly call methods of the objects that make up System Preferences. A simple way to get System Preferences to "Show All" is to simply call

Re: Close System Preferences programmatically

2011-01-04 Thread eveningnick eveningnick
> - 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. Peter, could you hint me on how to do it using AppleEvents? Googling, i have found some references to Om

Re: Close System Preferences programmatically

2011-01-04 Thread Dave DeLong
s/installer/uninstaller/ Dave On Jan 4, 2011, at 2:14 PM, Dave DeLong wrote: > 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

Re: Close System Preferences programmatically

2011-01-04 Thread Dave DeLong
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. Y

Re: Close System Preferences programmatically

2011-01-04 Thread Peter Lübke
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 Preferenc

Re: Close System Preferences programmatically

2011-01-04 Thread John Joyce
On Jan 4, 2011, at 3:20 PM, eveningnick eveningnick wrote: > Hi Nick > Thank you > I've an unusual application that is mainly located in System > Preferences (its gui part), and which can be uninstalled by clicking a > button "Uninstall" in that prefpane > > better solution would be to programma

Re: Close System Preferences programmatically

2011-01-04 Thread Murat Konar
1:56 PM, eveningnick eveningnick wrote: > >> Is it possible to close System Preferences programmatically from >> within a custom preference pane? > > Yes. > >> What would be the correct way? > > You could just call -[NSApplication terminate:], though I'

Re: Close System Preferences programmatically

2011-01-04 Thread Kyle Sluder
On Tue, Jan 4, 2011 at 12:56 PM, eveningnick eveningnick wrote: > Is it possible to close System  Preferences programmatically from > within a custom preference pane? What would be the correct way? > Is it possible to programmatically press button "Show all"? You should neve

Re: Close System Preferences programmatically

2011-01-04 Thread eveningnick eveningnick
Hi Nick Thank you I've an unusual application that is mainly located in System Preferences (its gui part), and which can be uninstalled by clicking a button "Uninstall" in that prefpane better solution would be to programmatically press "Show All" button ("back" in System Preferences), but that se

Re: Close System Preferences programmatically

2011-01-04 Thread Nick Zitzmann
On Jan 4, 2011, at 1:56 PM, eveningnick eveningnick wrote: > Is it possible to close System Preferences programmatically from > within a custom preference pane? Yes. > What would be the correct way? You could just call -[NSApplication terminate:], though I'm wondering why

Close System Preferences programmatically

2011-01-04 Thread eveningnick eveningnick
Is it possible to close System Preferences programmatically from within a custom preference pane? What would be the correct way? Is it possible to programmatically press button "Show all"? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists