cmd_popup Function (ROM Call 0x36E)

AMS 1.01 or higher bascmd.h

void cmd_popup (ESI ItemList, ESI SymName);

Executes TI-Basic 'Popup' command.

cmd_popup displays a popup menu containing character strings from the list of strings pointed to by ItemList (it should point to the tag of the list, i.e. to the LIST_TAG), waits for the user to select an item, and stores the index of the selection in the TI-Basic variable determined by the SymName parameter (see SYMSTR). If the variable does not exist, it will be created. Each item in the list expression must be a string. Also, both the ItemList and SymName entries must be on the expression stack, and the SymName entry must be exactly below the ItemList entry on the expression stack (the ItemList entry is usually on the top of the expression stack). As this function serves mainly as an internal subroutine for executing the TI-Basic Popup command, such a limitation is not so unusual.

Note: See PopupNew, PopupDo, and other functions from menus.h, for much more flexible methods to create popup menus in a C program.


Uses: HeapFree, HeapFreeIndir, ER_catch, ER_success, ER_throwVar, GetValue, HToESI, next_expression_index, push_quantum, push_quantum_pair, top_estack, PopupAddText, PopupDo, PopupNew, strlen, primary_tag_list, push_simplify, DerefSym, VarRecall, VarStore, ROM Call 0x480


See also: cmd_toolbar, menus.h