Re: Launching a preference pane from inside a Cocoa app
Re: Launching a preference pane from inside a Cocoa app
- Subject: Re: Launching a preference pane from inside a Cocoa app
- From: Mark Suman <email@hidden>
- Date: Wed, 1 Apr 2009 12:42:04 -0600
I have a tendency to overcomplicate things. Thanks for the simple solution.
That worked like a charm.
Mark
On Wed, Apr 1, 2009 at 12:07 PM, Sherm Pendley <email@hidden>wrote:
> On Wed, Apr 1, 2009 at 1:54 PM, Mark Suman <email@hidden> wrote:
>
>> The part that's tripping me up is launch System Preferences and then
>> opening
>> a certain pane.
>
>
> Just open the .prefPane bundle itself - System Preferences.app knows how to
> handle the rest. For instance:
>
> [[NSWorkspace sharedWorkspace] openFile:@
> "/Library/PreferencePanes/Growl.prefPane"];
>
> Additionally, if the .prefPane hasn't been installed yet, System
> Preferences.app will ask if you want to install it, and if so, whether to
> install it globally or just for the current user. In the former case, it
> will handle the necessary authentication for you.
>
> sherm--
>
> --
> Cocoa programming in Perl: http://camelbones.sourceforge.net
>
>
_______________________________________________
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