06-30-2010 02:31 PM
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.
Solved! Go to Solution.
06-30-2010 02:56 PM - edited 06-30-2010 02:56 PM
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...
06-30-2010 02:58 PM
Was the tab control set to be an indicator?
Lynn
06-30-2010 03:05 PM
@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
06-30-2010 03:27 PM
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).
06-30-2010 04:08 PM - edited 06-30-2010 04:09 PM
@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
06-30-2010 04:09 PM
Simulated mouse click at the coordinates of the sheet selected within the tab control?
-AK2DM
06-30-2010 04:13 PM
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.
07-01-2010 06:30 AM
@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