Texas Instruments TI89 Developer Guide - Page 367
OO_CondGetAttr, 3.3.3. Frame Description Language
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 367 highlights
Appendix A: System Routines - Apps 325 OO_SetAppAttr Declaration: BOOL OO_SetAppAttr (AppID app, ULONG selector, void * value) Category(ies): Apps Description: Sets the value of an attribute in an app's object frame. Changes the value if the attribute exists or adds a new slot if the attribute does not exist. If the app frame is marked read-only (as is the case with Flash-resident frames), a new frame will be allocated in heap memory and linked at the head of the app frame's parent hierarchy. The new attribute value is then placed in the RAM frame. Inputs: app - ID of application containing object frame where attribute search should begin. selector - Attribute selector number. value - New value for attribute. The value may be any integer or pointer which fits in 32 bits. Integer values must be cast to (void *) to avoid compiler warning messages. Outputs: Returns TRUE if the attribute value was updated. This routine will return FALSE if it runs out of heap memory while attempting to expand the frame to add a new attribute slot or link a new frame into the app frame's parent hierarchy. Assumptions: Rarely would you call OO_SetAppAttr directly. The FDL compiler (see section 7.3.3.3. Frame Description Language) compiles attribute declarations into access macros with the call to OO_SetAppAttr containing the proper selector number, value and return type casts. You would call the macro instead of OO_SetAppAttr. Side Effects: May cause heap compression. Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: OO_CondGetAttr, OO_GetAppAttr, OO_GetAttr, OO_HasAttr, OO_SetAttr Example: /* Set app's default menu */ OO_SetAppAttr(EV_runningApp, OO_APP_DEFAULT_MENU, &menu); /* Better yet, call the macro generated by FDL: */ SetAppDefaultMenu(EV_runningApp, &menu); /* Actually, there is a routine in the OS which does exactly this. . . . */ EV_registerMenu(&menu); TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001