Apple Newton Utilities Guide de l'utilisateur Page 610

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 609
CHAPTER 16
Find
16-22 Using the Find Service
Your FindSoupExcerpt method may also extract extra information if the nder
frame has been set up to hold additional data. For example, if the date associated
with each found item was saved, you could use this information to build more
descriptive titles for overview items.
The following example shows the implementation of a simple
FindSoupExcerpt method:
myApplication.FindSoupExcerpt:=
func(entry, myFinder)
begin
//We simply return the string in our entry’s name slot
entry.name;
end
For a complete description of the FindSoupExcerpt method, see
“FindSoupExcerpt” (page 13-19) in Newton Programmers Reference.
If you are using the
ROM_CompatibleFinder proto, this nder must contain the
strings that a
ROM_SoupFinder’s FindSoupExcerpt method would return. For
more information see the description of the
items array in
“ROM_CompatibleFinder” (page 13-7) in Newton Programmer’s Reference.
The ShowFoundItem Method 16
This method locates the specied item in your application’s data and displays it,
performing any scrolling or highlighting that is appropriate. A typical
ShowFoundItem method may need to
open a view appropriate for displaying the target
set the cursor or the target slot to reference the target
scroll the contents of the display view to make the target visible
highlight the target in the display view
The implementation of a
ShowFoundItem method depends on which nder proto
you use. This section describes an example
ShowFoundItem method suitable for
use with the
ROM_SoupFinder proto.
If you’ve based your nder frame on the
ROM_SoupFinder proto, the
ShowFoundItem method is passed two arguments: the soup entry that
the user tapped in the Find overview, and the nder frame your application
added to the
results array of nder frames.
The system expects your application’s
ShowFoundItem method to look like the
following example:
ShowFoundItem: func(myEntry, myFinder) begin . . . end
Vue de la page 609
1 2 ... 605 606 607 608 609 610 611 612 613 614 615 ... 941 942

Commentaires sur ces manuels

Pas de commentaire