02-19-2008 01:07 PM - edited 02-19-2008 01:08 PM
02-19-2008 01:57 PM
The easiest thing would be to get rid of the Mouse Down? event and use just the value change event. Make the rest of the code in the event dependent on the result of the first dialog.
By the way, this does seem to be a bug, so I would suggest that you report it.
02-19-2008 01:57 PM
02-19-2008 02:09 PM
Thanks for the responses. This event was to handle three different buttons, so I was trying to avoid duplicating code by placing it in each Value Change event. But maybe I'll have to...
It is interesting that it works in Highlight Mode, there must be some timing issues between the Mouse Down? event and the actual Value Change event.
I've reporte the bug to NI.
Michael
02-19-2008 02:21 PM
02-19-2008 02:29 PM
02-19-2008 02:31 PM
Another option is to put all three value changes into a single event case. Then, build the wires coming out of the control terminals into an array and search that array for a T value. That should tell you which of the buttons was pressed. This assumes that the buttons have a latched mechanical action.
Another way of doing this is to build their references into an array and use the CtlRef output terminal available in the event structure to search that array.
02-19-2008 02:33 PM
02-19-2008 02:34 PM
02-19-2008 02:47 PM
Thank you Matthew for that explanation, it seems sound. My only problem in understanding the behavior now is why after pressing Continue on the dialog box, then clicking anywhere on the Front Panel that the Mouse Up is attibuted to the OK button.
TST and GerdW, thank you for the additional suggestions. I'll probably build a subVI, keep it simple. I'd like to keep the Value Change events seperate as they are fairly different.
Michael