09-24-2024 08:52 AM
Recursively handle value change events on all cluster elements : r/LabVIEW (reddit.com)
So, apparently if you register for cluster value change events in nested clusters and use a Value Change(Signalling) it'll propagate to parents, but not to children, even if the child is in fact changed!
Tested in 2019 and 2024
09-24-2024 09:36 AM
Nice catch!
Verified in LV24Q3.
Checked dynamic event registration, fails too.
Checked callback event registration, fails too.
09-24-2024 11:21 AM - edited 09-24-2024 11:26 AM
@Yamaeda wrote:
Recursively handle value change events on all cluster elements : r/LabVIEW (reddit.com)
So, apparently if you register for cluster value change events in nested clusters and use a Value Change(Signalling) it'll propagate to parents, but not to children, even if the child is in fact changed!
Tested in 2019 and 2024
It will also fire both cases if you directly change the value of the nested cluster directly and not use a Value Signaling Property node.
Not sure if this is a bug or unexpected behavior. The value of both the nested cluster and parent cluster have changed, so both events actually occurred. If you start to have more than 1 parent child, I imagine it will become difficult to keep track of which clusters should fire an event.
It also seems odd to have different events for nested clusters whose value has changed. It should be trivial to see what value has changed and decide what to do accordingly.
EDIT: Reread post and understand difference. But still not sure whether the value change on the parent should propagate to the nested child. Using the front panel directly I cannot change the child without triggering the event. Changing the parent only changes a parent event. I thought you did not want propagation of the change up to the parent when only the child was changed.
09-24-2024 11:41 AM
@mcduff wrote:Not sure if this is a bug or unexpected behavior. .
IMO, it's a bug and unexpected behavior 😆.
09-24-2024 12:01 PM
wiebe@CARYA wrote:
@mcduff wrote:Not sure if this is a bug or unexpected behavior. .
IMO, it's a bug and unexpected behavior 😆.
Excuse my stupidity and ignorance, but maybe you can explain the bug better.
Case: Nested Cluster - Register Value Changed event for both the parent and child cluster
Effect - Value Change of Child - fires an event in the parent case also
Effect - Value Change of Parent - only fires a single event
The Event Log below shows this, change child also get a parent event, change parent no child event.
What am I missing?
09-24-2024 02:34 PM - edited 09-24-2024 02:37 PM
@mcduff wrote:
wiebe@CARYA wrote:
@mcduff wrote:Not sure if this is a bug or unexpected behavior. .
IMO, it's a bug and unexpected behavior 😆.
Excuse my stupidity and ignorance, but maybe you can explain the bug better.
Case: Nested Cluster - Register Value Changed event for both the parent and child cluster
Effect - Value Change of Child - fires an event in the parent case also
Effect - Value Change of Parent - only fires a single event
The Event Log below shows this, change child also get a parent event, change parent no child event.
What am I missing?
I believe that the OP is specifically speaking about firing Events by writing to the Value property of a nested Cluster element using a property node of the parent cluster configured to write Value(Signaling).
This signals a value Change to the Parent object but not the child. RATIONAL the p-node is working on the called Object. So, even though the property written is an element in a sub-object, you are signaling a value change of the object ThisObject (being the object that the property node has been created to act on)
This is the behavior I expect! I will admit that it may sound like "LabVIEW minutea that may.bite you someday"
isn't there a long thread full of that information?
09-24-2024 04:07 PM
@JÞB wrote:
I believe that the OP is specifically speaking about firing Events by writing to the Value property of a nested Cluster element using a property node of the parent cluster configured to write Value(Signaling).
With the example given, whether I change the value directly or by a Value(Signaling) node, I see the same effect. I'm glad I'm no the only one who doesn't see the issue.
09-25-2024 06:24 AM
@mcduff wrote:
wiebe@CARYA wrote:
@mcduff wrote:Not sure if this is a bug or unexpected behavior. .
IMO, it's a bug and unexpected behavior 😆.
Excuse my stupidity and ignorance, but maybe you can explain the bug better.
Case: Nested Cluster - Register Value Changed event for both the parent and child cluster
Effect - Value Change of Child - fires an event in the parent case also
Effect - Value Change of Parent - only fires a single event
The Event Log below shows this, change child also get a parent event, change parent no child event.
What am I missing?
Effect - Value of child changed through Parent property, only fires single event.
09-25-2024 07:56 AM
@Yamaeda wrote:
Effect - Value of child changed through Parent property, only fires single event.
okay, now I am starting see the issue
09-25-2024 09:11 AM
@mcduff wrote:
@Yamaeda wrote:
Effect - Value of child changed through Parent property, only fires single event.okay, now I am starting see the issue
....Which is not an issue! The property node only signals a VC Event on the object it refers to and not every component of every data element inside the containing object.
Imagine how filled up the Event Queue would get if you signaled VC events for every value in "Clustersaurus Rex!" And that is the alternative, "Carpet bomb" every data value, even if there are hundreds of them! So, signaling only signals a VC Event on "ThisObject."