How do I bring up the VAR-LINK dialog from C code and then get the name of the file that was selected?
This is an advanced question. As the VAR-LINK dialog is an event-driven applet, you must use event-driven functions defined in the events.h header file. Bringing up the VAR-LINK dialog is quite easy: EVENT ev; ev.Type = CM_KEYPRESS; ev.extra.Key.Code = KEY_VARLNK; EV_defaultHandler (&ev); but getting the name of the file that was selected is a bit harder. After executing the VAR-LINK dialog, the VAR-LINK applet will send the name of the selected file to the current application via the CM_HSTRING message. This message may be captured by a user event handler. Here is the demonstration program (called “Get File Name”): // Open VAR-LINK dialog and let user select something #define USE_TI89 // Compile for TI-89 #define USE_TI92PLUS // Compile for TI-92 Plus #define USE_V200 // Compile for V200 #define MIN_AMS 100 // Compile for AMS 1.00 or higher #define SAVE_SCREEN // Save/Restore LCD Contents #include
Related Questions
- When I refresh my web browser after making code changes, why does Eclipse bring up a dialog with the message "Hot code replace failed"?
- How do I bring up the VAR-LINK dialog from C code and then get the name of the file that was selected?
- Why does the XML catalog preference dialog only show URI Key type entry when no file is selected?