10-02-2012 03:35 AM
Hello,
I use "Register for Events" in my VI but I am facing a strange behavior when removing one element from the front panel. Let's imagine a quick example:
I have a front panel with four graphs. I want know which graph I clicked on. So, I have a string indicator that will show which graph I clicked on. However, at certain time I decide to remove one of these graphs from the front panel.
Then, I go to Block Diagram and Remove the case into the event structure which was handling events related to that specific graph (lets take as example graph 1 - it is the one that I want to remove).
Next, I select the Graph, its Reference and the wire (LOL) and remove them from the block diagram.
After removing Graph 1, you can see that the Event Structure still matches. I mean, the case that handles events for Graph 2 still shows String Constat "GRAPH 2"
Finally, I want to remove the "Mouse Down" from the "RegEvents" to have everything set.
But after that I start facing the issues. The cases into the event structure don't match to the strings anymore!
I've tried all possible sequences of removing these elements (wiring, unwiring Dynamic Event, etc.) but I am still getting this problem.
Is there a way to remove a element from front panel, remove it's event structures cases and terminals into the "RegEvents" and prevent case structure from messing up everything thing?
Find attached the code.
Thanks.
Dan07.
10-02-2012 03:46 AM
I mistyped the last phrase. It should be:
Is there a way to remove an element from front panel, remove it's event structures' cases and terminals into the "RegEvents" and prevent event structure from messing up everything?
10-02-2012 08:16 AM
10-02-2012 10:19 AM
I'm not completely surprised something like this would happen. The event structure is somewhat loosely coupled with the dynamic events and the way they are registered. Deleting one thing could easily disrupt the order.
If you go into the edit events for each event case that is wrong, you can easily change it back to match up with the correct event.
10-02-2012 10:52 AM
10-03-2012 04:12 AM
This is a bug and it's a real PITA.
Will NI admit it's a bug? I don't know. You should file a bug report.
Shane
10-05-2012 04:43 PM
Would be great to "freeze" the event structure in order to modify the "regevents" without changes into the right sequence of cases into the event structure.