LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab Control "magically" changing value? (a riddle for all to enjoy)

Solved!
Go to solution

As a preface:  After a number of hours of involuted testing, probing, and banging my head against the wall, I did actually find the cause of the unusual behavior in question.  I am posting it here for edutainment purposes.

 

The setup:

I have a moderately complex user interface that utilizes a tab control to keep modal actions separate.  The default tab allows one to select a spreadsheet to load, and when the user loads a spreadsheet, data from that sheet is used to populate ring controls on various pages and initialize controls.  The catch is that when the user loads the file, the tab control is changing to a different sheet. 

 

No local variables referencing the tab control were used in the making of this VI.

 

The crux of the matter is... what other actions in LabVIEW could possibly change the value of that tab? 

 

Procedure:

I'd like to run this in the model of the classic riddle game.  All questions should be in the form of yes/no.  There is pertinent info implied but not disclosed by the preceding information; good questions will readily reveal that.  The person who correctly deduces the cause of the odd behavior earns a free drink at NI Week and/or the unending respect of their peers*,

 

 

 

 

 

 

*Limited time offer.  Your mileage may vary.  No warranty is expressed or implied.  Tip your waiter.

Message 1 of 9
(4,582 Views)

Was the tab control terminal on the connector pane of its owning VI?

Was a reference to the tab control being inadvertently wired to a "Value" property node somewhere?

 

That's my best two guesses, before I start asking about weird stuff like reentrant clones, subpanels, and the like...

0 Kudos
Message 2 of 9
(4,568 Views)

Was the tab control set to be an indicator?

 

Lynn

0 Kudos
Message 3 of 9
(4,562 Views)

 


@Trager wrote:

The setup:

I have a moderately complex user interface that utilizes a tab control to keep modal actions separate.  The default tab allows one to select a spreadsheet to load, and when the user loads a spreadsheet, data from that sheet is used to populate ring controls on various pages and initialize controls.  The catch is that when the user loads the file, the tab control is changing to a different sheet.


 

Somewhere you've manged to get a property of the tab control e.g. tab names or value among your ring controls. In some old VI's i've debugged some properties and references had their names changed, so they were named e.g. Numeric1 but following their "link to" they pointed at Boolean2 or something. That makes for easy debugging. ^^

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 9
(4,554 Views)

Darren: 

 

No, this is the top level UI.  No connector pane assignments.  And there are no Property.Value nodes with the tab's refnum as input, nor are there any Property.Value nodes with the corresponding data value as the Value input.  (A long way of saying "No", I admit, but I tested the living daylights out of that hypothesis)

 

Lynn:

 

No, the tab is a control. 

 

Yamaeda:

No, all of the property nodes dealing with the ring controls are bounded by filtering case structures based on the Class ID of the object reference.  At no time are any of the property nodes (and there are a lot of 'em) within the VI (or its subs) changing the Value property of the tab control (nor the Value (Signaling) one, if you thought I was weaseling out that way).

0 Kudos
Message 5 of 9
(4,540 Views)
Solution
Accepted by topic author Trager

@Trager wrote:

As a preface:  After a number of hours ...  I am posting it here for edutainment purposes.

 

The setup:

...modal actions separate.  ...when the user loads a spreadsheet, data from that sheet is used to populate ring controls on various pages and initialize controls.  The catch is that when the user loads the file, the tab control is changing to a different sheet

 

No local variables referencing the tab control were used in the making of this VI.

 

The crux of the matter is... what other actions in LabVIEW could possibly change the value of that tab? 

 

Procedure:

I'd like to run this in the model of the classic riddle game.  All questions should be in the form of yes/no.  ...


 

Changinge key focus to a control on another tab will switch to that tab, so...

 

Are Key-focus nodes present in the diagram or subs?

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 9
(4,520 Views)

Simulated mouse click at the coordinates of the sheet selected within the tab control?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 9
(4,513 Views)

Can't believe you got it that quickly, Ben.  Well done, sir.

 

Incidentally, I think this is quirky behavior at best... I would prefer for VI Server to throw an error if you try to key focus a control that's not currently on a displayed panel, and I had assumed that to be the case.

0 Kudos
Message 8 of 9
(4,507 Views)

@Trager wrote:

Can't believe you got it that quickly, Ben.  Well done, sir.

 

Incidentally, I think this is quirky behavior at best... I would prefer for VI Server to throw an error if you try to key focus a control that's not currently on a displayed panel, and I had assumed that to be the case.


 

 

 

Re: quickly

I think that is the reason they keep me around.

 

Re:Quirky

 

Let me respond with a question. How long would it take for someone to declare it a bug

if it did not switch the tab?

 

Thanks for the game!

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 9
(4,428 Views)