If I add a parameter in my code I can choose if it is integer, decimal, boolean or MM type.
Is it possible to have a parameter which value is selectable among 2 or more defined value in a window, in the same manner as MM type (but other values and not simple, exponential, …)?
It’s not possible since variables can only handle numbers and not strings. There’s no way to determine external parameters by code (I’d like to!), but you can only add them manually in the variables window.
Yes, I know that variables can only handle numbers and not strings, in fact in MM type choosing “simple” the variable becomes 0, choosing “exponential” the variable becomes 1 and so on.
I would want to have the possibility that choosing “my first choice” the variable becomes 0, choosing “my second choice” the variable becomes 1 and so on.
is it possible to change the text displayed in MM type variable window?
It is not possible to change the text in the variable window.
However, you can set an integer variable, named “var1” for example and do the following to select different choice:
if var1 = 0 then
// do something
elsif var1 = 1 then
// do something else
// ..... etc with 2,3,4, ....
endif
Yes, but people, that use my indicator and can’t read the code, have not the possibility to associate 0, 1, … value with the behaviour of the indicator.
I must explain in an external files what 0, 1, 2, … means
Then you should make a nice colorful PDF documentation to explain it 😉