Re: How do I get services?
Re: How do I get services?
- Subject: Re: How do I get services?
- From: Ali Ozer <email@hidden>
- Date: Tue, 3 Jul 2001 08:52:02 -0700
On Monday, July 2, 2001, at 09:56 , David Rogers wrote:
>
How do I get services to show up in my app menu? Right now I have none
>
and
>
I'd like to be able to use Grab to take screenshots.
Services are equivalent to data being copied from your app, processed,
and pasted back in. Sometimes there is no data copied, or data
pasted --- for instance, Grab is a one way service which brings an image
into a context which can accept it, while TextEdit's open file is a one
way service which takes a file name but doesn't return anything.
To enable services to appear, views in your app typically declare what
types of data they are willing to copy and/or paste. From that info, and
from the services available on the machine, the services menu is built
automatically.
Grab will typically show up in your services menu if you have some view
which is willing to accept images. A rich text view is an example of
this, or a graphics view such as the one in Sketch. If your app has
this, just make sure the view declares that it's willing to accept
images, and Grab should appear in the menu.
Or maybe what you really are asking for is a service entry which has no
data in or out; that is, you just want to use the services menu as a
convenient way to launch and use Grab. I suppose if Grab declared a
service which had no data copied or pasted this might work (actually I
am not sure of this...), but this is not standard use of services. If
your app wants to be able to use Grab for screenshots explicitly, you
can have a custom menu item in your app to launch Grab (use NSWorkspace
to do this). If you want to convenient access to Grab as a user, you can
put it in your dock.
Ali