Re: Updating available services with -[NSWorkspace findApplications]
Re: Updating available services with -[NSWorkspace findApplications]
- Subject: Re: Updating available services with -[NSWorkspace findApplications]
- From: Jeff Cruikshank <email@hidden>
- Date: Tue, 3 Jul 2001 21:44:17 -0700
Ok, perhaps I need to rephrase the question... How can I have my app
provide its services without requiring the user to log out?
If I do log out and then log back in, my services are available to other
apps, but I want to avoid this logging out business. I thought that if I
called findApplications the first time my app is run, that the services
menu for other cocoa apps would update to reflect the addition of my
services, but it appears that nothing happens (the services menu for
other cocoa apps remain unchanged). The documentation for NSWorkspace
led me to believe that this was possible. Is there a way to do this?
Thanks!
Jeff
On Tuesday, July 3, 2001, at 07:22 PM, Art Isbell wrote:
On Tuesday, July 3, 2001, at 01:27 PM, Jeff Cruikshank wrote:
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).
Launching an app isn't necessary for its services to be registered
and to appear in other apps' Services menus.
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.
- (void)findApplications
Examines all applications in the normal places (/Network/Applications,
/Applications, /Developer/Applications) and updates the records of
registered services and file types.
If your app isn't installed on the application search path, its
services won't appear in other apps' Services menus.
I'm calling [[NSWorkspace sharedWorkspace] findApplications] right
after I've called [NSApp setServicesProvider:self].
Unless apps might have been added or removed before your app is
launched and you want their services to show up in your app's Services
menu, I don't know why you'd need to invoke findApplications. But
maybe I don't understand exactly what you're trying to accomplish.
Art Isbell
Apple iServices Technical Support
http://www.apple.com/iservices/webobjectssupport/
+1-808-591-0836
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev