Accessing checkbox state from an XOP
DB30
Sat, 11/22/2014 - 10:54 am
In an effort to clean up some code that makes heavy use of globals to store the state of GUI checkboxes, I've started taking advantage of value =_NUM:num and ControlInfo. One short fall of this is that I can't seem to find as easy way to directly access the state of checkboxes from XOPs. Before I could do this by simply reading the global associated with the state. Currently I'm still having to store the states in a separate wave which is then accessed by the XOP. This removes some of the connivence of using _NUM:num etc. Is it possible to directly access the parameters associated with setVariable and checkboxes from an XOP?
If that does not work in your situation I can see two ways to achieve what you want:
1. Have the checkbox action procedure call the XOP to inform it of the checkbox state each time the state changes.
2. Write an external function that calls a user-defined function using the CallFunction XOPSupport routine. The user-defined function will call ControlInfo and return the value of V_value. The XOP gets the user-defined function result from CallFunction.
November 22, 2014 at 02:55 pm - Permalink
November 23, 2014 at 08:13 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
November 26, 2014 at 09:32 am - Permalink