View System and Messages
InstallScript
is a function that is part of your application package. It executes when your application is installed. You should be aware of the three different times your application is installed:1. The user explicitly installs the application (using Newton Package Installer or NTK, for instance).
2. The Newton gets reset (by the user, the system, or an act of God). This causes each application to be reinstalled.
3. The user inserts a card. Each application on the card is installed.
The RemoveScript
is called when your application is deinstalled. There are also two different times when it can be called:
1. The user explicitly deinstalls the application by deleting it from the Extras drawer.
2. The user removes a card. Each application on the card is deinstalled.
If the user removes the card, the RemoveScript
is called after the card is removed. Thus, the application's templates and protos are no longer available.
The DeletionScript
is called when your application is explicitly deleted (it isn't called when the user removes a card). In this function, you might delete any data your application has created on the Newton (subject, of course, to user confirmation).
Each of the functions is created in text files in your project (see "Working with Part Frames" on page 417). For applications, the InstallScript
and RemoveScript
take a partFrame
parameter, which contains information about your package, including the application symbol. Your InstallScript
can add slots to the part frame that can then be retrieved in your RemoveScript
.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996