• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSService - I need a headslap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSService - I need a headslap (From: Steve Cronin <email@hidden>)
 >Re: NSService - I need a headslap (From: Ron Fleckner <email@hidden>)
 >Re: NSService - I need a headslap (From: Steve Cronin <email@hidden>)
 >Re: NSService - I need a headslap (From: Peter Ammon <email@hidden>)

  • Prev by Date: Re: NSService - I need a headslap
  • Next by Date: Re: Getting the value of GUI elements from non-main threads
  • Previous by thread: Re: NSService - I need a headslap (A Solution)
  • Next by thread: Re: NSService - I need a headslap
  • Index(es):
    • Date
    • Thread