background image
C H A P T E R 1 6
Find
Using the Find Service
16-11
Employ multiple data sets from one application in a Selected find by adding
the method
AppFindTargets
, and one or both of the search methods
FindTargeted
and
DateFindTargeted
.
Replace the system-supplied Find slip with one of your own by supplying a
CustomFind
method in your application's base view. This method will be
called when the user taps Find and your application is frontmost.
The sections immediately following describe these tasks in detail.
Creating the title Slot
16
A string that is your application's user-visible name must be available in a text slot
called
title
. You need to create this slot in the view referenced by the
owner
slot
of the finder frame returned by your search method. Commonly, the
owner
slot
references the application's base view and the
title
slot resides in this view.
The Find service uses this string in the list of application names displayed for
Selected finds as well as in the overview of found items.
Creating the appName Slot
16
Your application's base view must contain an
appName
text slot. This slot holds a
string that is your application's user-visible name. The value of this slot is used to
name the Find slip button that represents your application when it is the current
application. It is also employed by other system services to obtain a user-visible
name for your application.
Using the Finder Protos
16
You use a finder proto as the basis from which to construct the finder frame
returned by your search method. The two system-supplied finder protos are
employed according to the data type you use for your application's data storage.
You can create your own customizations at compile time by creating an item like
the following example:
kMySoupFinder:= {
_proto: ROM_SoupFinder,
Delete: func()
begin
print("About to delete " &
Length(selected) && "items");
inherited:Delete();
end
}
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна