LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reordering typedef cluster of controls scrambles references of these controls on the block diagram and even scrambles events handled by the event structure

I am using LV2011 and having issues when I reorder items inside the typedef cluster.

 

Explanation of the issue: I have a typedef cluster of controls on the front panel and I created references of these controls on the block diagram. These references are wired to property nodes etc. I also use event structure in my Idle loop to handle certain events. Some of the events in the event structure are tied to some of these controls in the typedef cluster to handle the value change event. Here is the problem, whenever I reorder items inside the typedef cluster, all my references on the block diagram and events tied to these controls in the event structure are changed. I do not get any broken wire since all these controls are the same type of control buttons and it is so hard to adress or correct the changes since I have QDMH structure and lots of cases and SubVIs using these references, Is this a bug in LV2011? Why references and events are changing when I reorder items in the cluster? Lets make the problem clear by giving an example to reproduce the issue:

 

Assume that you have control buttons A,B and C in a typedef cluster on the front panel and initially, the order of these items in the cluster is A,B and C. Create references for A,B and C on the block diagram and also create event structure and add 3 different events to handle value change event for each button. So far, we have total of 3 references on the block diagram and 3 value change event cases added to the event structure. Go ahead and open typedef of the cluster and reorder items in it. Lets say new order is B,C and A. Now, look at the block diagram, when you apply changes, you will see that all your references and event cases will change according to the order that you just made. It is not supposed to change since these references are wired to their own code and events are handling their own stuff and it is very difficult to correct this if you have a large scale of application.

 

Is there any other way around to avoid this issue?      

Senior Software Developer
0 Kudos
Message 1 of 6
(2,930 Views)

@Freelion8 wrote:

I am using LV2011 and having issues when I reorder items inside the typedef cluster.

 

Explanation of the issue: I have a typedef cluster of controls on the front panel and I created references of these controls on the block diagram. These references are wired to property nodes etc. I also use event structure in my Idle loop to handle certain events. Some of the events in the event structure are tied to some of these controls in the typedef cluster to handle the value change event. Here is the problem, whenever I reorder items inside the typedef cluster, all my references on the block diagram and events tied to these controls in the event structure are changed. I do not get any broken wire since all these controls are the same type of control buttons and it is so hard to adress or correct the changes since I have QDMH structure and lots of cases and SubVIs using these references, Is this a bug in LV2011? Why references and events are changing when I reorder items in the cluster? Lets make the problem clear by giving an example to reproduce the issue:

 

Assume that you have control buttons A,B and C in a typedef cluster on the front panel and initially, the order of these items in the cluster is A,B and C. Create references for A,B and C on the block diagram and also create event structure and add 3 different events to handle value change event for each button. So far, we have total of 3 references on the block diagram and 3 value change event cases added to the event structure. Go ahead and open typedef of the cluster and reorder items in it. Lets say new order is B,C and A. Now, look at the block diagram, when you apply changes, you will see that all your references and event cases will change according to the order that you just made. It is not supposed to change since these references are wired to their own code and events are handling their own stuff and it is very difficult to correct this if you have a large scale of application.

 

Is there any other way around to avoid this issue?      


I haven't found a way around this issue.  This also happens when you re-order something in a typedef'd enum.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(2,925 Views)

So, you think this is the way how typedef stuff works or it is a bug needs to be fixed immediately?

Senior Software Developer
0 Kudos
Message 3 of 6
(2,922 Views)

@Freelion8 wrote:

So, you think this is the way how typedef stuff works or it is a bug needs to be fixed immediately?


Well, it's consistent so I have to believe that's the way it needs to be.  Fix this and you probably end up with all sorts of unexpected behavior elsewhere is my guess...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(2,898 Views)

I developed a large scale application using Queue Driven Message Handler (QDMH) structure and I have lots of cases and handling events through the application. I built an array of references from many front panel objects, some of them are individual controls, some of them are from typedef clusters etc. I am using this array of references in many places, sometime I index the array and extract a specific reference in a SubVI to make changes on the main front panel control such as disable and gray out, enable, etc. If the order of the array changes because of reordering items in the typedef cluster, you will have in a big trouble since every reference that you use to handle different operations, all of them will be scrambled. I believe typedef should not work in this way and my references are not supposed to be changed just by reordering items in the cluster. This issue is considerably big issue since troubleshooting takes a lot of time.

Senior Software Developer
0 Kudos
Message 5 of 6
(2,889 Views)

@Freelion8 wrote:

I developed a large scale application using Queue Driven Message Handler (QDMH) structure and I have lots of cases and handling events through the application. I built an array of references from many front panel objects, some of them are individual controls, some of them are from typedef clusters etc. I am using this array of references in many places, sometime I index the array and extract a specific reference in a SubVI to make changes on the main front panel control such as disable and gray out, enable, etc. If the order of the array changes because of reordering items in the typedef cluster, you will have in a big trouble since every reference that you use to handle different operations, all of them will be scrambled. I believe typedef should not work in this way and my references are not supposed to be changed just by reordering items in the cluster. This issue is considerably big issue since troubleshooting takes a lot of time.


Careful what you wish for.  As I said, fixing this one issue may create 10 more.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(2,875 Views)