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 (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