background image
C H A P T E R 1 6
Find
16-14
Using the Find Service
If your application does not store data as soup entries, you can use the
ROM_CompatibleFinder
proto as the framework from which to create your
finder frame. Although
ROM_CompatibleFinder
provides most of the services
that
ROM_SoupFinder
does, it does not respond to messages sent by the system
when the user files, deletes, or moves items in the Find overview. The following
methods have the same definitions in the
ROM_CompatibleFinder
as they have
in the
ROM_SoupFinder
. If you use
ROM_CompatibleFinder
proto, in most
cases, you must define the following methods to work on your data structures:
FileAndMove
Delete
IsSelected
SelectItem
ForEachSelected
GetTarget
The commonality of definition between these methods causes problems in some
cases. For instance, when used with the
ROM_CompatibleFinder
proto, the
ForEachSelected
method must be overridden because it is expected to return
an array of soup entries.
The
ROM_CompatibleFinder
proto has the two following methods which are
not found in the
ROM_SoupFinder
proto:
ShowFakeEntry
ConvertToSoupEntry
When you use the
ROM_CompatibleFinder
proto, you should define a
ShowFakeEntry
method that makes sure your application is open, and calls your
ShowFoundItem
method.
The convenience method,
ConvertToSoupEntry
, returns a soup entry when
given a data item as a parameter.
Implementing Search Methods
16
Your application conducts searches in response to messages that it receives from
the system. You must supply a search method for each message that your application
supports. These methods are usually defined in your application's base view;
they include:
Find
DateFind
FindTargeted
DateFindTargeted
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна