C H A P T E R 1 6
Find
16-8
Using the Find Service
ROM_CompatibleFinder
proto, the string to display for each found item is
contained in the
title
slot of each of the items in the
items
array in your finder.
When the user taps scroll buttons to scroll through this list of found items, the
system keeps track of the user's place in the array of found items. Figure 16-8
depicts the strings from both the
title
slot and the
FindSoupExcerpt
method
as they are used in a typical Find overview.
Figure 16-8
Strings used in a Find overview
When the user taps an item in the overview, the system sends a
ShowFoundItem
message to the view specified by the
owner
slot in your finder frame (which you
appended to the system's
results
array). In the template of the specified
owner
view, you define a
ShowFoundItem
method that must locate the found item in
your application's data and perform any actions necessary to display it, including
scrolling or highlighting the item as appropriate. Although the interface to the
ShowFoundItem
method varies according to the finder proto your finder is based
on, you can often use the same method to display the results of both text and date
searches. If you are using a finder based on
ROM_CompatibleFinder
, you must
override its
ShowFakeEntry
method to call your
ShowFoundItem
method.
text from
title
slot
text returned by
FindSoupExcerpt