alecjcook Posted March 16, 2016 Report Share Posted March 16, 2016 Say I have a UI that consists of two units: 1, an Input String (System) 2, a Boolean OK button (System) I run a Event Structure and a queue based producer consumer loop, create an event for "Value Change" on the String and another for "Value Change" on the Boolean. If I place the cursor (Key focus) on the string and type something, when I have finished typing a (while key focus is still held by the string) press on the Boolean, then the Value Change for the string will be processed, but the Boolean Press event will be missed. Does anyone know how to get around this? (I have attached an example to show you what i mean. Type something into the text box and press the button immediately after) Many thanks, Alec Quote Link to comment
Benyamin.KH20 Posted March 16, 2016 Report Share Posted March 16, 2016 why you use 2 while loop in a program ? did you see CPU in task manager when run program? Quote Link to comment
alecjcook Posted March 16, 2016 Author Report Share Posted March 16, 2016 why you use 2 while loop in a program ? did you see CPU in task manager when run program? I think your grasp on LabVIEW architecture is a little loose my friend. Why don't you run this program and take a look at the CPU load for yourself. Quote Link to comment
ShaunR Posted March 16, 2016 Report Share Posted March 16, 2016 (edited) The dialogues use "Root Loop" and the message pump is probably halting before sending the message once the first dialogue is shown. Use your own dialogue or set the string to "Update value while typing" to separate the events.. This should give you the result you are expecting. Edited March 16, 2016 by ShaunR Quote Link to comment
Ryan Podsim Posted March 16, 2016 Report Share Posted March 16, 2016 (edited) It is because the Button is never changing values. As soon as you click outside of the String, its Value Change event fires opening the dialog. Since the Boolean is set to Latch on Release, the OBD interrupts the Release of the Boolean and never changing the value. Set the Boolean to Latch on Press and you will get both event firing. Edited March 16, 2016 by Ryan Podsim 2 Quote Link to comment
alecjcook Posted March 17, 2016 Author Report Share Posted March 17, 2016 It is because the Button is never changing values. As soon as you click outside of the String, its Value Change event fires opening the dialog. Since the Boolean is set to Latch on Release, the OBD interrupts the Release of the Boolean and never changing the value. Set the Boolean to Latch on Press and you will get both event firing. Awesome, That's Spot on! Cheers! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.