C H A P T E R 1 6
Using the Find Service
The most important difference between Local finds and other kinds of find
operations is that when the system invokes your search method as part of a Global
or Selected find, your application may not be open. Therefore, you must test to see
that the application soup is available before searching it.
The system informs your search method of the scope of the search through the
parameter. You can choose to ignore it or you can modify your application's
actions based on whether the value of this parameter is
. The system passes the
symbol when it invokes
your search method for a Global or Selected find. The
passed for Local find operations.
Checklist for Adding Find Support
To add application support for the Find service, you need to do the following:
slot, in the view referenced by the
slot of your finder
frame, that contains the user-visible name of the application.
slot in your application's base view that contains the user-
visible name of the application.
Choose a finder proto on which to base your application's frame. You should
if your data is stored in a single soup, and
Supply at least one search method (
Append the resultant finder frame to the system-supplied
array at the
end of your search method(s).
method that extracts strings from soup entries for
display in the Find overview. This method is required only if you use the
proto. If you use the
must add a
slot with a string defining each found item to the frame
representing the item.
method that displays an individual entry from the
When using a
proto, write a
method to call your
When using the
, you should either not allow
your found items to be selected (and thus not routed), or override the relevant
Optionally, you may also do the following:
Register and unregister for participation in Global and Selected finds.