Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 22:41:54 +0000



[Programming Help] - How to know if the user changed an input value

View Count: 322

[2023-01-12 19:42:13]
ycomp - Posts: 321
is there any way to know if the user changed an input value? user open studies settings and changes a value

or to know at least that the dialog was opened and some settings were potentially changed?

for example I would like to calculate something based on the value of an input, I could do this once initially using a persistent variable that sets to 1 if study settings have been initialized, but - what if someone then changes some study input's value? this persistent "init" variable would still be set to 1 so it won't execute that code again even though the input has changed.
[2023-01-12 21:46:52]
User183724 - Posts: 183
if you set (or read) the value initially and later check the value, if its different, its been changed... if its the same as the intial value, it hasn't
[2023-01-12 22:04:44]
User183724 - Posts: 183
you'd need an if statement...

if(var == intial value)

{
perform this code if intial value hasn't changed...


}

else
{
either skip over this or perform this code
}
Date Time Of Last Edit: 2023-01-13 00:05:59

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account