LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Typedef TAB control - consistent behaviour?

Hello,

 

I wonder if this is an expected thing or not. Scenario: open a VI, go to the front panel. Place a TAB control into it. Make it a type definition. This is a common scenario, because if later you change pages, then you do not need to remake your Tab constants in your BD.

Ok, now place an object into your TAB control. Like a numeric or boolean, etc. Right click, and select "Change to array". This is a no op! No warning, no msg, nothing. If you make an array outside, of course it works, you can pull the array into the Tab control page.

 

Is this expected behaviour? For example, when we deal with a type definition cluster, the deal is simple: you have to open the type definition, and edit elements there. But a TAB control is a different thing. I would expect that we can change between element/array types right in the Tab page...

Tested in LV2017 SP1, LV2018.

0 Kudos
Message 1 of 11
(2,661 Views)

My experiences of using Tab controls have included all sorts of strange behaviours - so much so that I just avoid using them now. I do like the enum behaviour.  I would not say that is expected behaviour at all, but perhaps you can expect the unexpected?

0 Kudos
Message 2 of 11
(2,634 Views)

Seems to work fine in LabVIEW 2018. (tried with modern and system tab).

 

Can you attach some example code.

0 Kudos
Message 3 of 11
(2,629 Views)

Odd.

You can add a control to the tab typedef itself and flip that between array and element, but of course that is an invalid control.

The first time I tried it I disconnected the tab from typedef with a boolean still on it, moved the boolean off and tried to convert to array. It momentarily blinked to an array but reverted to an element ??

On closing LV and restarting I got the error message dialog indicating an error had occurred.

Doesn't seem right ...

 

Tested with LV2017

 

0 Kudos
Message 4 of 11
(2,621 Views)

@altenbach wrote:

Seems to work fine in LabVIEW 2018. (tried with modern and system tab).

 

Can you attach some example code.


Did you make the Tab control a typdef?

Simple test ctrl and VI attached.

Download All
0 Kudos
Message 5 of 11
(2,612 Views)

Tried your code Blokk ... which was identical to mine and no, it doesn't work.

I wouldn't call this expected behaviour ...

 

0 Kudos
Message 6 of 11
(2,609 Views)

@Blokk wrote:

Did you make the Tab control a typdef?

Simple test ctrl and VI attached.


Yes, I made the tab a typedef. Converting a scalar to array worked both on the front panel and even in the control editor.

 

(Sorry, not near a computer, will look at your vi tomorrow).

0 Kudos
Message 7 of 11
(2,603 Views)

@altenbach wrote:

@Blokk wrote:

Did you make the Tab control a typdef?

Simple test ctrl and VI attached.


Yes, I made the tab a typedef. Converting a scalar to array worked both on the front panel and even in the control editor.

 

(Sorry, not near a computer, will look at your vi tomorrow).


Strange! I mean it is strange it works for you, and does not work for 2 of us. Please others: could you test this behavior? 🙂

0 Kudos
Message 8 of 11
(2,593 Views)

LV 2017: Replace Array on the numeric causes the Control to briefly flicker and move, then return back to its position and being a numeric. It's like the operation is reverted during the process.

 

LV 2016: Same as LV2017, except that the flickering is slower and I can see that the Array is created and positioned Before reverting back to a numeric.

 

Certified LabVIEW Architect
0 Kudos
Message 9 of 11
(2,586 Views)

@Blokk wrote:
Strange! I mean it is strange it works for you, and does not work for 2 of us. Please others: could you test this behavior? 🙂

OK if I (LabVIEW 2018):

  • open a new VI,
  • place a tab control,
  • right-click...make typedef,
  • open typedef,
  • save typedef under new name.
  • Place scalar control on tab

-----> making the scalar to an array still works fine.

 

If I now continue... :

  • save and close the VI
  • open the VI again

-----> making a scalar to an array no longer works!.

 

Obviously, there is something going on that deserves an investigation.

 

0 Kudos
Message 10 of 11
(2,567 Views)