38
P
P
R
R
O
O
G
G
R
R
A
A
M
M
M
M
I
I
N
N
G
G
T
T
H
H
E
E
H
H
P
P
3
3
9
9
G
G
S
S
&
&
H
H
P
P
4
4
0
0
G
G
S
S
T
T
h
h
e
e
d
d
e
e
s
s
i
i
g
g
n
n
p
p
r
r
o
o
c
c
e
e
s
s
s
s
An overview
Although you can choose to simply create programs, it should be remembered that the whole point of working
on the hp 39gs or hp 40gs is to use aplets. Working with an aplet means that you inherit its abilities such as
auto setting of axes in the
PLOT
screen and so on. A program shares none of these and must re-create them
when needed. This chapter will concentrate on the process of creating aplets which, in addition to their native
abilities, possess enhanced powers provided by attached ‘helper’ programs. Part of this process will involve
the creation of these ‘helper’ programs, and some readers may choose to concentrate solely on that aspect.
Whilst this is obviously easier in the short term, the results are far less powerful than the creation of aplets.
The key to the entire process of creating completely new aplets is the
VIEWS
menu and its controlling
command function
SETVIEWS
. This function allows you to override the normal behavior of an aplet and
superimpose new properties by linking in a set of programs written by you. This is the single most important
point in the process and should be kept in mind.
It is mildly deceptive to call these aplets “new”, as they always derive from one of the standard ones, but the
modification of the
VIEWS
menu means that their final appearance and behavior can be very different to the
aplet they derive from.
Essentially the process involves the following stages…
•
Choose the parent aplet, based on what abilities you want the child aplet to have;
•
Analyze the behavior you require the aplet to have and design the
VIEWS
menu;
•
Write the ‘helper’ programs and attach them to the aplet using the
SETVIEWS
function;
•
Add supporting documentation. This last point is often overlooked but in many ways it is as important
as the programming itself. Your user must be able to use the aplet or else why did you write it?
255