I want to be able to do the following:
- Right-click on a control on my user interface and select “Add Event Case to Control Callback” (if a callback function already exists)
- CVI brings up a dialog similar to what you see at Code>>Preferences>>Default Events to select an event for that control
- Check the box for one or more events for that control, click OK, then
- Have CVI find the existing control callback function and add a case to the switch statement for each event I checked
If you haven’t written any code in the callback already, you can just change the default events and re-generate (replace) the control callback.
However, if you have already written code for one event case, the only way I can find to add an event case is to do it manually. I go to Code>>Preferences>>Default Events or use the Operate tool to look for the constant name of the event that I am interested in, then I go back to my code and manually type out “case EVENT_CONSTANT_NAME: break;” with the name of the event and hope I remember it correctly and spell it right.
CVI is all about minimizing user errors and reducing development time by, you know, not making you type things out yourself, so I think this functionality would be a useful addition.