LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding tab to typedef tabcontrol causes class conflict with global variable

Hi,

 

I am quite new to labview. I have to update an existing program and I have a problem whith a tabcontrol. In attachement, I give you a very simple solution showing my problem.

 

I have defined a simple tabControl in a typedef ctl. I had it to a VI and in block diagram of this VI, I want to fill a global variable with this control and this global variable is set as "Include Data Type".

 

When creating my ctl file with a simple tabcontrol, there is no problem but my tabcontrol only contains 2 tabs. When I use "Add page after" in my ctl file to create a third one, after saving, I get a class conflict error on wire to global variable in my block diagram.

 

If I remove added page, all is OK again. I don't understand why adding a new page causes a class conflict. In my attachement, it is very simple but in program that I have to modify, I already have 15 tabs and I just want to add a 16th one so, I am sure there is a mean, but impossible to fond it after many hours...

 

If someone can tell me how to make my example works with "Include Data Type" (if I remove it, it always works but that is not what I want) and adding an additional tab, it would hemp me a lot!

 

Thanks in advance.

 

Yohann

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

The problem is that the tab is an enum, and you can't wire two strictly typed references of two different enums together, because they are considered different data types. What you can do is right click the reference control in the global variable and select Show Control, which will show the data type of the reference. You can then replace the control inside the reference with the typedef, which will cause it to update correctly.

 

Although that will solve the problem, if you have the reference to a tab control in a global variable, you probably have some issues with your code, but that's not something which can be commented on without more details.


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,592 Views)

Hi,

 

It works. I agree with you about design. Such global variables are used to allow a frame/area/panel to modify another one. But it should be done by User Event to have loosely coupled component. It is done like this in another place in code, but here, I have to extend an existing mechanism so, I can't change this point.

 

Thanks a lot!

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