Re: NSService - I need a headslap
Re: NSService - I need a headslap
- Subject: Re: NSService - I need a headslap
- From: Dave Dribin <email@hidden>
- Date: Wed, 4 Feb 2009 15:33:04 -0600
On Feb 4, 2009, at 2:37 PM, Peter Ammon wrote:
On Tiger and earlier, there is no way to avoid needing to log in and
out. On Leopard, you can use the function NSUpdateDynamicServices()
to immediately scan for new Services. If you're just testing, a
quick way to scan for new Services is to run pbs directly:
/System/Library/CoreServices/pbs
However, pbs has no supported public interface and this will (has
already) change, so don't include any reference to pbs in a script.
NSUpdateDynamicServices() is the right way to programmatically
refresh Services.
FYI, I've found that using RubyCocoa is a nice way to do this, for
testing:
% ruby -rosx/cocoa -e 'OSX.NSUpdateDynamicServices()'
-Dave
_______________________________________________
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