LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: Nested cluster Value change events


@mcduff wrote:

Here is one more, somewhat crazy, example that may/may not convince you, this is not a bug and expected behavior. 

 

One the front panel I have a Tree Control. The only way to interact with the control is with the mouse. I am registered for the following events: Mouse Down and Value Change. If I change the value on the front panel with the mouse the following events occur: mouse down, then value change. That is always the order of events.

 

Now in my block diagram I set the Value(Signaling) property node. What events should trigger? Should it be only a Value Change Event (no bug) or a Value Change and Mouse Down Event (bug)?


Why on earth would you expect a Value (Signaling) to trigger a mouse down event?

 

This has nothing to do with nested controls nor cyclic event nor events triggering events.

 

Value (signaling) triggers a Value change event, it's not a simulation of a user clicking to change the value. That is the reason a VS triggers a VC and not a Mouse Down event.

 

Again, no event triggers another event. The user clicks, that triggers a mouse down event. The click triggers a value change, that triggers a value change event.

0 Kudos
Message 21 of 37
(656 Views)

wiebe@CARYA wrote:

@mcduff wrote:

Here is one more, somewhat crazy, example that may/may not convince you, this is not a bug and expected behavior. 

 

One the front panel I have a Tree Control. The only way to interact with the control is with the mouse. I am registered for the following events: Mouse Down and Value Change. If I change the value on the front panel with the mouse the following events occur: mouse down, then value change. That is always the order of events.

 

Now in my block diagram I set the Value(Signaling) property node. What events should trigger? Should it be only a Value Change Event (no bug) or a Value Change and Mouse Down Event (bug)?


Why on earth would you expect a Value (Signaling) to trigger a mouse down event?


On the Front Panel, a value change on the Tree cannot occur without a Mouse Down Event. You are expecting the the Value(Signaling) to act just like Front Panel Event, so why not? (I do not expect this behavior that is why I do not think this is a bug.) You are expecting the Value(Signaling) Event in Main Cluster to trigger any events subelements in that cluster may be registered for.

 

Why do you expect events for actions that preceded the Value(Signaling) Event?

0 Kudos
Message 22 of 37
(651 Views)

Here's a strong indication that events are not generated by events (but instead by the Value (Signaling).

 

The TO is the only event in the event structure: what you see is all there is.

wiebeCARYA_0-1727360316174.png

Boolean 1 is a control in each and every way exactly the same as Cluster 2 is a control...

 

So why does the Value (Signaling) put a Cluster and a Boolean 1 VC event on the event queue, but not a VC event for the Cluster 2?

 

Spoiler
Because it's a bug...

Well, at least it's not expected, and even if you would expect it, it's debatable to a degree that there should be documentation added to the help.
Message 23 of 37
(648 Views)

wiebe@CARYA wrote:

Again, no event triggers another event. The user clicks, that triggers a mouse down event. The click triggers a value change, that triggers a value change event.


Look at the example provided in the beginning of the post. I change the subelement of a cluster then another event occurs, value change of the main element. It is actually the same event, but two event cases are executed.

0 Kudos
Message 24 of 37
(647 Views)

@mcduff wrote:

Here is one more, somewhat crazy, example that may/may not convince you, this is not a bug and expected behavior. 

 

One the front panel I have a Tree Control. The only way to interact with the control is with the mouse. I am registered for the following events: Mouse Down and Value Change. If I change the value on the front panel with the mouse the following events occur: mouse down, then value change. That is always the order of events.

 

Now in my block diagram I set the Value(Signaling) property node. What events should trigger? Should it be only a Value Change Event (no bug) or a Value Change and Mouse Down Event (bug)?


UI interaction (including mouse down - with associated filter event if required) and setting a value change programmatically are not the same thing.

 

I would not expect a value changed event fired from the BD to trigger a mouse event, that would be plain wrong. I don't see what this has to do with the OPs report of cluster vs cluster elements.

0 Kudos
Message 25 of 37
(644 Views)

wiebe@CARYA wrote:

Here's a strong indication that events are not generated by events (but instead by the Value (Signaling).

 

The TO is the only event in the event structure: what you see is all there is.

wiebeCARYA_0-1727360316174.png

Boolean 1 is a control in each and every way exactly the same as Cluster 2 is a control...

 

So why does the Value (Signaling) put a Cluster and a Boolean 1 VC event on the event queue, but not a VC event for the Cluster 2?

 

Spoiler
Because it's a bug...

Well, at least it's not expected, and even if you would expect it, it's debatable to a degree that there should be documentation added to the help.

 

Look at the event log in Message 5, two events occur when the subelement is changed.

 

Maybe you should have NI chime in, I still do not think this is a bug and if worked the way you want it to work then there would be issues.

0 Kudos
Message 26 of 37
(644 Views)

@mcduff wrote:
You are expecting the the Value(Signaling) to act just like Front Panel Event, so why not? (I do not expect this behavior that is why I do not think this is a bug.) You are expecting the Value(Signaling) Event in Main Cluster to trigger any events subelements in that cluster may be registered for.

I absolutely DO NOT expect a VS to act like a Front Panel Event.

 


@mcduff wrote:

Why do you expect events for actions that preceded the Value(Signaling) Event?


I don't.

 

I expect value change events when the value changes (or it can actually stay the same if VS is used).

 

A value signaling should trigger a value change event.

 

All your logic doesn't explain why this works for an element in a cluster (expected), but not for a cluster in a cluster (expected).

0 Kudos
Message 27 of 37
(642 Views)

@mcduff wrote:

wiebe@CARYA wrote:

Again, no event triggers another event. The user clicks, that triggers a mouse down event. The click triggers a value change, that triggers a value change event.


Look at the example provided in the beginning of the post. I change the subelement of a cluster then another event occurs, value change of the main element. It is actually the same event, but two event cases are executed.


It's not the same event.

 

2 events are enqueued, because two events where registered.

 

I flush the events. If it was 1 event, the other would be empty.

0 Kudos
Message 28 of 37
(639 Views)

wiebe@CARYA wrote:

@mcduff wrote:
You are expecting the the Value(Signaling) to act just like Front Panel Event, so why not? (I do not expect this behavior that is why I do not think this is a bug.) You are expecting the Value(Signaling) Event in Main Cluster to trigger any events subelements in that cluster may be registered for.

I absolutely DO NOT expect a VS to act like a Front Panel Event.

 


@mcduff wrote:

Why do you expect events for actions that preceded the Value(Signaling) Event?


I don't.

 

I expect value change events when the value changes (or it can actually stay the same if VS is used).

 

A value signaling should trigger a value change event.

 

All your logic doesn't explain why this works for an element in a cluster (expected), but not for a cluster in a cluster (expected).


Just to add my POV: I agree that it's super inconsistent behaviour that warrants the label bug, whether documenting WHY it is like this (good luck with that) or fixing the fact that it shouldn't be like this, either way, I see no way past labelling this a bug.

Message 29 of 37
(636 Views)

@mcduff wrote:


On the Front Panel, a value change on the Tree cannot occur without a Mouse Down Event. 


While your VI is running, you can press the Tab key on your keyboard to set key focus on a tree control. You can then use the arrow keys on your keyboard to change the selected row (i.e. the value) of the tree control. No mouse interaction required.

0 Kudos
Message 30 of 37
(598 Views)