• 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: reset NSServices values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reset NSServices values


  • Subject: Re: reset NSServices values
  • From: Peter Ammon <email@hidden>
  • Date: Mon, 28 Jan 2008 12:00:13 -0800


On Jan 26, 2008, at 5:42 PM, Denise Eatherly wrote:

Hi,

I managed to get NSServices to send the right types to my app under Leopard thanks to Even Gross's hint. Now I'm having problems getting other apps to recognize the new values. Even after restarting the computer and relaunching my app, Safari and TextEdit continue to try to use the old methods. It looks as though resetting the Launch Services database will do the trick, but I hesitate to ask users to enter such a scary command as this:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ LaunchServices.framework/Support/lsregister -kill -r -domain local - domain system -domain user

I also found a very nice AppleScript posted & that is an improvement, but is there a better way to reset just the NSServices values?

Hi Denise,

Under Leopard, the NSUpdateDynamicServices() function will cause a rescan of Services. Apps will pick up any changes without needing to be relaunched, but be aware that the scan may take several seconds and the function will return before the scan is finished. (Under Tiger, this function exists but does nothing.)

-Peter

_______________________________________________

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: 
 >reset NSServices values (From: Denise Eatherly <email@hidden>)

  • Prev by Date: Re: Getting called back when an NSScrollView is scrolled
  • Next by Date: Re: The mouse is where, again?
  • Previous by thread: reset NSServices values
  • Next by thread: Running an NSTask Within an NSThread
  • Index(es):
    • Date
    • Thread