LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug ? Pressing XY Graph Scaling buttons generates Tab Control.Value change event

Encountered this strange phenomenon and don't know if it's a bug or what. I have a Tab control with XY Graph on one page and several other pages with miscellanous controls and indicators. I have an Event Structure for sniffing when user changes the Tab page. This works just fine, but when the user has selected the page with the XY Graph and presses one of the scaling buttons on Scale legend - the Tab control.Value change -event is triggered twice (!!). Surely this is some sort of a bug ? It's generating plenty of problems for my application as I'm trying to find some sort of a workaround.

 

I have attached an example vi (LabVIEW 2011) to demostrate the problem.

 

1. Start the vi

2. Select Page 2

3. Select Page 1

4. Press X-autoscale on Scale legend.

 

Any ideas why it works like that ? Am I missing something obvious ?

 

Cheers,

 

Cerati

0 Kudos
Message 1 of 4
(2,501 Views)

The Good News is you are not crazy.  I was able to reproduce what you saw.  A curious finding is that if you fiddle with the Graph controls before changing the tabs, you do not get extra "Value Change" events.

 

I had forgotten what the "Type" element on the Event box was, so I wired an indicator up to it and tried your program again.  Would you believe it now crashes LabVIEW, giving a "We're Sorry for the Inconvenience" message?  I've sent the crash report, along with your VI and the "innocent" modification I made that caused LabVIEW itself to crash.

 

Two Bugs for the Price of One!  How can you beat that!

0 Kudos
Message 2 of 4
(2,481 Views)

I see this in LV10 as well.  I suggest you add a Mouse Down? event for the XY Graph and feed a True boolean into a Shift Register.  In the Value Change Event for the Tab Control ignore if this Boolean is True.  Most events can just pass the default false, if you have a Tab Mouse Down? event it should pass the SR value through unchanged.

0 Kudos
Message 3 of 4
(2,467 Views)

Bob and Darin, thank you for confirming this strange discovery. Happy to hear I was not hallucinating. I will try the workaround on Monday when I'm back at the office.

 

Cheers,

 

Cerati

0 Kudos
Message 4 of 4
(2,459 Views)