O'Reilly logo

Palm Programming: The Developer's Guide by Julie McKeehan, Neil Rhodes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Find

In this section, we discuss the Find feature of the Palm OS. First, we give you an overview of Find, the user interface, and its intended goals. Second, we walk through the entire Find process from the beginning to the end. Third, we implement Find in our sample application and discuss important aspects of the code.

Overview of Find

The Palm OS user interface supports a global Find—a user can find all the instances of a string in all applications. The operating system doesn’t do the work, however. Instead, it orders each application, in turn, to search through its own databases and return the results.

There is much to be said for this approach. The most obvious rationale is that the operating system has no idea what’s inside the records of a database: strings, numbers, or other data. Therefore, it’s in no position to know what’s a reasonable return result and what’s nonsense. Indeed, the application is uniquely positioned to interpret the Find request and determine the display of the found information to the user.

Find requests are sent from the OS by calling the application’s PilotMain (see Section 4.5) with a specific launch code, sysAppLaunchCmdFind, along with parameters having to do with interpreting the Find.

The objectives of Find

Remembering that speed on the handheld is essential, Find is intended to be a very quick process. Here are some of the things that the OS does to ensure this:

No global variables

An application’s global variables are not created when it receives ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required