LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xcontrol ordering of events

OK, try to follow along with me...

 

I have a VI that contains an xcontrol as well as a ring control.  Within the xcontrol facade I have an array control of type string.  I have registered the "value change" event to the array on the facade so that when the user enters new data, some calculations take place, then the "data changed" bit is written on the facade.  This works fine, until the following scenario:

 

If the user edits a field, but leaves focus on the array, then they pulldown the ring control, the "value change" event within the xcontrol will fire as expected.  However, the "value change" event that I have registered for the xcontrol in the main VI, will not fire until the pulldown of the ring control is resolved.

 

This causes a problem because regardless of how I order the main VI event structure, the "value change" of the ring fires first before I am able to catch the edits to the xcontrol.  Is this expected behavior?  BOGUS

0 Kudos
Message 1 of 3
(2,276 Views)

Hi PVAHamm,

 

I was able to reproduce this behavior, but I'm not sure if this is expected.  XControls in general are meant to be asynchronous, so I can see why it may happen out of order.  I expect that pulling down the ring control takes hold of the UI Thread, which may prevent the XControl's event from being processed.  I'm not completely sure, though.

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(2,233 Views)

Thanks for looking into it Jared.

For now as a work around, I've used a MouseDown Filtering event to discard the ring ctl activation if the focus is on the xcontrol.  Which works, but is a little confusing from a UI standpoint.

 

I'd prefer if once the focus left the xcontrol, then the value change event would resolve regardless of ring activations.

0 Kudos
Message 3 of 3
(2,227 Views)