TmExecuteMethod Procedure
Executes a method that was set by TmSetMethod.
Usage
TmExecuteMethod, tool_name, method_name
Parameters
tool_name—The name of a VDA Tool.
method_name—The name of the method to execute.
Keywords
No_Wset—If nonzero, indicates that the WSET command is not run to change the current window.
Top—The name of the top-level widget.
Discussion
TmExecuteMethod is used in a VDA Tool program to tell the VDA Tools Manager when to execute a method for a particular instance of a VDA Tool. Methods allow multiple instances of VDA Tools to take actions independently, such as displaying graphics or generating PV‑WAVE code. When a method is activated, a method procedure is called that performs an action for the specific instance of the VDA Tool that triggered the method. It is up to the VDA Tools developer to determine which events trigger specific methods, and to write appropriate method call procedures.
Example
The following method call procedure contains TmExecuteMethod statements to convert coordinates and redraw graphics.
PRO DrawPlotCB, wid, data
; Get the tool name.
x = WtGet( wid, /Parent)
tool_name = WtGet(x, /Userdata)
; Convert the coordinates and redraw the graphics.
TmExecuteMethod, tool_name, 'TM_CONVERT'
TmExecuteMethod, tool_name, 'TM_DISPLAY'
END
See Also