Re: reset NSServices values
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