LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab Control Typedef Bug (LV 2014)

If you have a typedef'd tab control, and you rearrange the pages in the typedef, then apply the changes, on the instances of the typedef, only the labels will be rearranged, not the contents of the pages.  Each control on the tab control will be on the same ordinal page as before.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 13
(3,827 Views)

I don't think that is a bug -- I think that is the intended behavior (a.k.a. "Feature").  The labels on the tabs are names that we give to the data, analogous to naming an indicator that we wire to the output of a function.  If we swap the names of two LabVIEW variables, that does not swap their values.  Similarly, swapping the names of two Tab pages won't swap their content (values).

 

Bob Schor

 

P.S. Maybe I didn't understand the post, but hasn't the Tab Control always worked this way?

0 Kudos
Message 2 of 13
(3,809 Views)

The name of the method is "Rearrange Pages", not "Rearrange Labels".

If you open a binder and rearrange pages, do only the page numbers move around, or does the content move also?

 

The bug (yes, bug) does not occur if you rearrange pages on a non-type-def'd tab control.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 13
(3,774 Views)

I stand corrected.  Still, is this "new" with LabVIEW 2014?  I suspect if it has "always been this way" NI will be very reluctant to change it.

 

BS

0 Kudos
Message 4 of 13
(3,760 Views)
Whether bug or feature, one thing it is for sure: yet another reason to not use tab controls.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 13
(3,748 Views)
But seriously, why would you expect it to behave otherwise. A tab control is clearly not a container as shown by the fact that the terminals for controls and indicators appear on the block diagram as separate items.

Second, the controls and indicators associated with tabs are at best properties of the tab control, and properties are not part of a type definition. Its like the strings of a ring control.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 13
(3,732 Views)

@mikeporter wrote:
Whether bug or feature, one thing it is for sure: yet another reason to not use tab controls.

Mike...

And that was the reply I was waiting for...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 13
(3,720 Views)

Paul,

 

Can you post a VI that shows this behavior?  I'm mostly asking this because the rest of this post is just based on what I think is happening.

 

The first thing I noticed was that in the 2013 help for the Rearrange Pages Method it says that it is not available with strict type definitions.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvscript/tabcontrol_rearrange_pages/

 

I brought up the 2013 help because the 2014 help does not list all of the characteristics that 2013 lists.

 

http://zone.ni.com/reference/en-XX/help/371361L-01/lvscript/tabcontrol_rearrange_pages/

 

I think Bob's question is still the most relevant one in this thread.  This may not be what we want to happen, but it will only be a bug if it behaves in a way that contradicts documentation or if the bahavior is not consistent from year to year (when documentation does not reflect this of course).  I am not at work, but if you can share a VI that demonstrates this behavior I can try it on multiple LabVIEW versions.

Matt J | National Instruments | CLA
0 Kudos
Message 8 of 13
(3,702 Views)

It's a bug because rearranging pages on a typedef'd tab control produces a different result from rearranging pages on a non-typedef'd tab control.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 9 of 13
(3,662 Views)

Paul,

 

If you can post a simple example VI that shows this behavior I would be glad to take a look at to see what is going on and if this is a bug.  If it is a bug I will make a Corrective Action Request (CAR) so that this can be fixed in future iterations of LabVIEW.  The post I made earlier, that suggested this may not be a bug, referenced the help documentation for the Rearrange Pages Method. This document is linked below and states that the method is not available for Strict Type Definitions.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvscript/tabcontrol_rearrange_pages/

 

Rearrange Pages Method.PNG

This is the LabVIEW 2013 Help documentation and as I noted in my previous post, the remark on whether or not it is available with strict type definitions in LabVIEW 2014 help was absent.  If you would be willing to post a VI that demonstrates this behavior I can try this on my computer using multiple versions of LabVIEW and ask a few colleagues to determine whether this is a bug.

Matt J | National Instruments | CLA
0 Kudos
Message 10 of 13
(3,650 Views)