C H A P T E R 1 7
Additional System Services
Using Additional System Services
2. Open the status slip. There are three parts to this process:
Instantiate your status view by passing its template to the
Initialize the status slip by passing the template's setup frame to the status
Invoke the status slip's
method to display the slip.
3. Perform the operation on which you are reporting progress, updating the status
slip periodically by invoking the status view's
4. Write a
method which is executed when the user cancels
your operation with a "Cancel" or "Stop" button. If your action cannot be
cancelled, do not provide such a button.
Each of these steps is described in detail in the following sections.
Defining Status View and Component View Templates
You can create a status slip view from the system-supplied templates
Figure 17-8), or you can create your own template for this view.
Your status view template must have a
slot that holds the value
. It may also include
Methods and data that must be available to the status view or its child views.
slot. If this slot is present, the view system uses its
contents to initialize the status slip automatically when the slip is opened.
A frame describing a custom component template. This is needed only if you do
not wish to use one of the built-in templates. This frame must contain the
Height of the status slip, (not the component view) expressed
in pixels. Making this value part of the component view
template allows status slips to resize themselves based on the
height specified by their component views.
A symbol representing this template to the
method. For example, if the name of your component
, this slot should hold the
Array of frames specifying the view templates used to
instantiate the components of this view. These templates
should be based on one of the protos described in "Status
View Components" (page 14-14) in Newton Programmer's