Code center > Bugs and fixes

Aren't the veggies supposed to move a little?

<< < (3/3)

EricL:
Okay, I found and fixed another UI bug that was at the root of the Movement Effeciency and Brownian Motion combo box value persist problems.

I changed this code in DispSettings() in OptionsForm.frm (line1696)


--- Code: ---If TmpOpts.PhysMoving >= 1# Then
    BrownianCombo.text = BrownianCombo.list(0)
  ElseIf TmpOpts.PhysMoving >= 0.66 Then
    BrownianCombo.text = BrownianCombo.list(1)
  Else
    BrownianCombo.text = BrownianCombo.list(2)
  End If
--- End code ---
to this:

--- Code: --- 'EricL 3/21/2006 Changed from BrownianCombo to EfficiencyCombo in the section below to fix UI bug.  Cut and Paste error?
  If TmpOpts.PhysMoving >= 1 Then
    EfficiencyCombo.text = EfficiencyCombo.list(0)
  ElseIf TmpOpts.PhysMoving >= 0.66 Then
    EfficiencyCombo.text = EfficiencyCombo.list(1)
  Else
    EfficiencyCombo.text = EfficiencyCombo.list(2)
  End If
--- End code ---
Looks like a cut and paste problem.   Also, the # in the first chunk of code isn't my typo - it was really there and the code still compiled.  Anybody know enough VB to tell me what it did?  Anyway, I removed the # and changed the lines to refer to the right control and now both controls appear to work and persist properly.

Note that this was just another Heisenburgian UI bug as far as I can tell.  It only impacts the display, not the actual values used during a sim.

-E

Numsgil:
I believe 1# means 1 as a decimal value (ie: 1.0000) instead of an integral value.

Testlund:
You think you can make an exe of that too, Eric! I've waited sooo long for this!

EricL:
On it's way to you.

Testlund:
Wonderful!

Navigation

[0] Message Index

[*] Previous page

Go to full version