C H A P T E R 1 7
Additional System Services
Using Additional System Services
method rebuilds and updates all the status slip's child views,
you'll obtain better performance by calling
when you just need to update the gauge view. The
method rebuilds and updates only the gauge, barber pole, and
progress sheet views.
Implementing a CancelRequest Method
If your status slip provides a "Stop" or "Cancel" button, you may include a
with the button or write a
handle the necessary housekeeping. The
method can be
implemented either in the status slip or in the application (or transport) base view.
The system checks if the status slip has a
method, and if not
sends this message to the application (or transport) base view.
Using the Power Registry
This section describes the cooperative model that Newton devices use to turn
power on and off, and the battery information functions.
Registering Power-On Functions
You may register functions to be called when a Newton device is powered on with
function. When the Newton device is powered on, the system
calls your "power-on" callback function passing it a symbol indicating the reason it
was called. This allows your code to condition its actions accordingly. For example,
you might perform one set of actions when the user presses the power switch and
another set of actions when the device is powered on by the execution of an alarm.
symbol indicates that the user pressed the power switch. The
symbol is passed any time the Newton device is powered
up after an emergency power-off. An emergency power-off is any shutdown in
which one or more power-off scripts did not execute. The
indicates the presence of +5 volts on the serial port general-purpose input pin (pin
symbol indicates that the power-on was caused by the execution
of an alarm. The
symbol indicates that a PCMCIA card was inserted
function unregisters functions added with
The callback function registered with