Yes, inserting that @type declaration made the errors go away. Thank you for that tip!
I agree with Mark. Why has this warning message been added? To remove hundreds of warnings, must I now go through thousands of lines of code, finding every instance of “tempText”, to add an unnecessary type declaration?
Is it best practice to place the @type declaration right above the variable being typed, or is it better to place all the declarations in the header?
I also have a bunch of warnings on lines like this:
if(dsSummary.getValue(j,1) == distSvc_code) {
…generates this warning:
The function getValue(Number,Number) is not applicable for the arguments (None,Number)
A similar warning occurs with dsSummary.setValue, e.g.,
should be seen as a String. what could go wrong is that you reuse that same variable also for more things (like a number) then it can be that it doesn’t know exactly what it is.
in servoy 6.1.4 there will be quite a lot of fixes for the code completion/validation.
If you have an example what does go wrong in 6.1.3, that i can just drop into a js file on my workspace (or a sample solution) then i can check it how it works in the current code.
that that browse_form.js i see 3 times: tempText.indexOf and in the current code it doesn’t complain on any of those 3 lines, so i guess if that was a problem, it is fixed now