Jump to content

Event Structure - Events Missed


Recommended Posts

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

 

 

post-52118-0-83378400-1458149170.png

Link to comment

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.

Link to comment

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.

post-15232-0-56379000-1458152546.png

Edited by ShaunR
Link to comment

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 by Ryan Podsim
  • Like 2
Link to comment

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!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.