Updating available services with -[NSWorkspace findApplications]
Updating available services with -[NSWorkspace findApplications]
- Subject: Updating available services with -[NSWorkspace findApplications]
- From: Jeff Cruikshank <email@hidden>
- Date: Tue, 3 Jul 2001 16:27:38 -0700
My application provides a service which I would like to be available the
first time the app is launched (without requiring the user to log out
then log back in). The findApplications method in NSWorkspace sounds
like exactly what I need to call to update the services menu, but I
haven't been able to actually get it to work.
I'm calling [[NSWorkspace sharedWorkspace] findApplications] right after
I've called [NSApp setServicesProvider:self]. I know that the services
part of the app is working because it shows up in the services menu
after I log out and log back in. To rule out the possibility that it was
just something quirky in the way my app registers itself as a service
provider, I moved Stickies.app from /Applications to my home directory,
ran my program, and "Make Sticky" still showed up as an available
service. Logging out and the back in removed the "Make Sticky" service.
Has anyone been successful in using findApplications?
Thanks!
Jeff