Texas Instruments TI89 Developer Guide - Page 126
Starting and Stopping an Application, The above three messages, CM_START, CM_ACTIVATE, and CM_FOCUS
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 126 highlights
84 Chapter 9: Application Control Flow 9.4. 0x7C0 - 0x7FF Interapplication messages 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. 0x800 - 0xFFF Application string numbers Applications should index the text of their menus, dialog boxes, and error messages in this range of command numbers. 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 Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/126.png)