The part that's tripping me up is launch System Preferences and then opening
a certain pane. In Apple Script, I'd say:

*tell* application "System Preferences"

activate

*set* *the* current pane *to* pane id "com.foo.prefpane"

*end* *tell*

[[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:
@"com.apple.systempreferences" options:nil additionalEventParamDescriptor
:??? launchIdentifier:nil];

I would like to pass in something like "set the current pane to pane id
\"com.foo.prefpane\" to the event to tell System Preferences to change to my
pane.

Can anyone tell me how to pass that in?  I tried through
additionalEventParamDescriptor, but was unsuccessful.  It launches System
Preferences, but does not switch to my prefpane.  (It works correctly if I
run the Apple Script.)

Mark

On Mon, Mar 30, 2009 at 2:40 PM, Nick Zitzmann <n...@chronosnet.com> wrote:

>
> On Mar 30, 2009, at 11:17 AM, Mark Suman wrote:
>
>  Does anyone know the "Apple" way of launching a prefPane from a Cocoa app?
>>
>
>
> Yes. (If you were wondering _how_ to do it, then all you need to do is open
> the preference pane using NSWorkspace or Launch Services. System Preferences
> will then display the pane.)
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to