beautypg.com

Customizing an app – HP Prime Graphing Wireless Calculator User Manual

Page 266

background image

262

Programming in HP PPL

Customizing

an app

When an app is active, its associated program appears
as the first item in the Program Catalog. It is within this
program that you put functions to create a custom app. A
useful procedure for customizing an app is illustrated
below:
1. Decide on the HP app that you want to customize.

The customized app inherits all the properties of the
HP app.

2. Go to the Applications Library (

I

), highlight the

HP app, tap

and save the app with a unique

name.

3. Customize the new app if you need to (for example,

by configuring the axes or angle measure settings).

4. Open the Program Catalog, select your new app

program, and tap

.

5. Develop the functions to work with your customized

app. When you develop the functions, use the app
naming conventions described above.

6. Put the VIEW command in your program to modify

the app's View menu.

7. Decide if your app will create new global variables. If

so, you should EXPORT them from a separate user

program that is called from the Start() function in

the app program. This way they will not have their
values lost.

8. Test the app and debug the associated programs.
It is possible to link more than one app via programs. For
example, a program associated with the Function app
could execute a command to start the Statistics 1Var app,
and a program associated with the Statistics 1Var app
could return to the Function app (or launch any other app).

Example

The following example illustrates the process of creating a
custom app. The app is based on the built-in Statistics
1Var app. It simulates the rolling of a pair of dice, each
with a number of sides specified by the user. The results
are tabulated, and can be viewed either in a table or
graphically.