background image
C H A P T E R 1 6
Find
16-6
Using the Find Service
Compatibility Information
16
The current version of the Find service opens in the text or date find mode last
used. The Find slip in versions of Newton System Software prior to 2.0 always
opened in text find mode, regardless of the mode last used.
Find now performs "date equal" finds, and returns control to the user more quickly
than previous versions did. The Find slip no longer displays the total number of
items in the search result; that is, instead of displaying user feedback such as "This
is item 24. There are 36 items" the Find slip displays "This is item 24. There are
(no) more items."
The Find service now offers routines that allow you to include multiple data sets
from a single application in Selected find operations. Three new methods
support this functionality:
AppFindTargets
,
FindTargeted,
and
DateFindTargeted
. You use the
AppFindTargets
method to add identifying
strings for the data sets to the Selected picker. The two new Find methods with
which you implement targeted finds are
FindTargeted
and
DateFindTargeted
. They are identical to their nontargeted counterparts, except
the last parameter,
indexPath
, is a path to a data set within an application.
Do not modify any system data structures directly to register or unregister an
application with the Find service. Instead, use the
RegFindApps
and
UnRegFindApps
functions provided for this purpose. Applications running
on older Newton devices can use the
kRegFindAppsFunc
and
kUnregFindAppsFunc
functions provided by NTK for this purpose.
The
ShowFoundItem
method now has two parameters, a data item and a finder
frame. However, the old
ShowFoundItem
method, with one parameter (
item
) is
still supported.
The
SetStatus
method is obsolete; use the
SetMessage
method instead. In
addition, the
FileAs
and
MoveTo
methods are also obsolete; you should use
FileAndMove
instead.
Using the Find Service
16
This section includes a technical overview of Find operations and describes how to
implement Find support in your application.
Technical Overview
16
When the user taps the Find button, the system invokes your application's search
method. This can be a date find method (
DateFind
) or a text find method (
Find
).
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна