Apple Newton Utilities User's Guide Page 609

  • Download
  • Add to my manuals
  • Print
  • Page
    / 942
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 608
CHAPTER 16
Find
Using the Find Service 16-21
Note
Applications implementing these methods must also implement
the usual
Find and DateFind methods since a nd operation
may be dispatched as other than a Selected nd.
Returning Search Results 16
After constructing the nder frame, your search method needs to append it to the
system-supplied
results array. Each element in this array is a nder frame. In
the case of a nder based on the
ROM_SoupFinder, the array the frame has a
cursor for obtaining the items found in the search. In the case of a nder based on
the
ROM_CompatibleFinder proto, your nder frame contains an array of the
found items themselves. You need to use the global function
AddArraySlot to
append your nder frame to the
results array.
The following example shows a line of code that would be placed at the end of
your application’s search method to store the results of the search. In this code
fragment, the
results parameter is the system-supplied array passed to the Find
method, and the
myFinder parameter is the nder frame resulting from the
search. The following call to AddArraySlot places the nder frame, myFinder,
at the end of the
results array:
AddArraySlot(results, myFinder);
Note that the system’s results array is cleared when the Find slip closes.
Implementing Find Overview Support 16
The messages described in this section are sent to your application when the user
taps buttons in the Find overview. These include:
the FindSoupExcerpt message
the ShowFoundItem message
If your nder frame is based on
ROM_CompatibleFinder, you do not need to
write a
FindSoupExcerpt method, but you must also write a ShowFakeEntry
method to call your
ShowFoundItem method.
The FindSoupExcerpt Method 16
If you use the ROM_SoupFinder proto to construct a nder frame, your
application must supply a
FindSoupExcerpt method. This methods must extract
the name of a found item when it is given the soup entry and the nder frame, and
return it to the system as a string to display in the Find overview.
Page view 608
1 2 ... 604 605 606 607 608 609 610 611 612 613 614 ... 941 942

Comments to this Manuals

No comments