Page 2 of 2

Re: VoltageKnob - MaxValue???

Posted: Thu Jun 08, 2023 2:53 pm
by Waverley Instruments
Well, I do actually have controls that go up to 11, but I think I should probably re-phrase what was typed as a quick aside without much thought, but now seems to be the bone of contention that eclipsed the original question.
Waverley Instruments wrote: Thu Jun 08, 2023 9:23 amI should be able to set the value to whatever I like programmatically, including values outside the UI range.
I'm actually OK with the ability to set the value to whatever I like programmatically, including values outside the UI range.

I figure if you're going to do that, you've probably got your reasons and who am I to judge.

Alternatively, if you don't trust yourself not to do it accidentally, write your own code to validate, clamp, or throw an Exception (heaven forbid...)

-Rob

Re: VoltageKnob - MaxValue???

Posted: Thu Jun 08, 2023 11:27 pm
by Centripidity
ColinP wrote: Thu Jun 08, 2023 2:34 pm So this isn't actually a Spinal Tap spoof then?
:lol:

Re: VoltageKnob - MaxValue???

Posted: Fri Jun 09, 2023 6:37 pm
by seal58
Well - a hot debate, but without an answer to my question.
As programmer I use to think strictly logically. On this thinking a maximum IS a maximum, not MIGHT BE a maximum.
I'll ask CA team and will report their answer.

Re: VoltageKnob - MaxValue???

Posted: Fri Jun 09, 2023 9:09 pm
by Waverley Instruments
seal58 wrote: Fri Jun 09, 2023 6:37 pmWell - a hot debate, but without an answer to my question.
Apologies, as I thought I'd answered your question with my first post before it got derailed into a software best practices debate / lecture. Anyhoo, I can confirm, your observation is correct, in that SetValue() can set a value outside of the range previously specified in SetRange() for a VoltageKnob.

Whether we like it or not. Ahem. :D

I think I already suggested if that's a big deal, then concerned citizens should report it as a bug.

-Rob @ WI

Re: VoltageKnob - MaxValue???

Posted: Sat Jun 10, 2023 6:28 am
by seal58
Here is the CA answer:
Danny L

Staff – 10 hours ago via Email
Hi Roland,

This appears to be a bug - calling GetValue() will return a different value than the actual value if you've called SetValue() with a value that's out of range. In the meantime, we suggest that you bounds-check the values before calling SetValue().
I have logged a bug report on this and notified the developers as well.

Re: VoltageKnob - MaxValue???

Posted: Sat Jun 10, 2023 7:59 pm
by UrbanCyborg
Good to know. Thanks, Roland.

Reid