Hi,
Is there a way to do a quick check on a method to see
which variables are locally declared and wich are global ?
Because if you forget to declare a variable localy, it becomes a global automaticaly.
Regards,
Hi,
Is there a way to do a quick check on a method to see
which variables are locally declared and wich are global ?
Because if you forget to declare a variable localy, it becomes a global automaticaly.
Regards,
Hi Hans,
This should show up in the Problems tab under the warnings.
Thanks Robert,
But why should Servoy see it as a problem if I do not declare a variable localy
If I do :
var x = 1 // local
If I do
x=1 //global
the second one is not wrong or an error
Regards,
Hi Hans,
Correct, it’s not an error and is also not flagged as such. It’s flagged as a warning.
It’s just a heads-up that you may have forgotten to declare the variable.
I do not see any warning.
Is there some preference or other setting needed ?
You don’t get those warnings in Servoy 5, they were introduced in 6.0.