Starting And Stopping An Application - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

84
0x7C0 – 0x7FF Interapplication messages
0x800 – 0xFFF Application string numbers
9.4.

Starting and Stopping an Application

The calculator OS starts an application by sending it the CM_START message. A
field in the start message points to a window rectangle. This rectangle defines
the window location and size previously established by the user with split window
mode settings. The application should pass this rectangle to WinOpen to create
its initial window. This is also a good time to initialize data structures.
The APPS menu displays a submenu of start up options for some applications.
The start message tells the application which option the user chose: Current,
Open . . . , or New . . . .
The OS then sends the application a CM_ACTIVATE message. The activate
message tells the application that it is now the current active application. The
application should build and display its dynamic menu or pass the event
message to EV_defaultHandler to display its static menu. The application
should also call WinActivate to highlight its window border.
Finally, the OS sends the CM_FOCUS message. The application usually lets text
edit or default event handling process this event. If, however, the application
cannot start for some reason, this is the time to deal with it. It is only after this
third message is received that the application can force a quit and return to the
Home screen if there is insufficient memory or some other condition is incorrect
for the application to start normally.
The above three messages, CM_START, CM_ACTIVATE, and CM_FOCUS, are
sent at the start of every application. The application now begins to receive a
stream of events corresponding to user inputs.
When the user chooses another application from the APPS menu, the OS
terminates the current application by sending it three messages, CM_UNFOCUS,
CM_DEACTIVATE, and CM_QUIT in that order.
Text edit usually handles the CM_UNFOCUS message. The application may
ignore this message if it does not have an open text edit field.
TI-89 / TI-92 Plus Developer Guide
Chapter 9: Application Control Flow
Some of the built-in applications send messages to each other
with this range of commands, but this means of communicating
between applications is not recommended. Interapplication
messaging is largely replaced with an object-oriented approach.
Applications communicate with each other through their frame
interface.
Applications should index the text of their menus, dialog boxes,
and error messages in this range of command numbers.
Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents