When Servoy reports an error it specifies the line number the error occurred on.
Eclipse’s line numbers are for the entire file containing the method, rather than the method itself. This makes it difficult to use the line number reported in the error message.
Any way to see line numbers for individual methods within Eclipse?
Eclipse’s line numbers are for the entire file containing the method, rather than the method itself. This makes it difficult to use the line number reported in the error message.
Huh, maybe I miss something but the line number mentioned is the same as in the file so it is easy to navigate to it (use or and type in the line number).
I’m pretty sure he is referring to when there is an exception thrown in smart client, only the line number in the function (rather than the whole .js file) is displayed.
I just tested it in Developer 4.1 and the error shows the linenumber in the file, not the linenumber in the function. So it works correctly.
Or are you talking about some error message in Client ?
Should probably be a little more specific.
This behavior is exhibited in smart client in a deployed solution, not smart client from developer, where it does show the correct line number in the .js file.
this is not that simple, we need a repo upgrade (solution version upgrade) for this to happen
because the solution model doesnt know about the line numbers at all so we dont have that information in deployed mode
So this wont happen before at least 4.2
Not only is it that the line # is reported per method but the line where the function is declared is also seen as line 1 as far as I can see.
That means that line #8, for instance is in fact line #6.
Not only is it that the line # is reported per method but the line where the function is declared is also seen as line 1 as far as I can see.
That means that line #8, for instance is in fact line #6.
For a second there was I starting to think Marcel was some super programer that has never had an exception in deployed code
I just migrated my solutions to 4.1.3 and I must fully agree with Adrian. With Eclipse it is not easy to find where the bug is located.
I get message like this:
TypeError: Cannot find function setText. (myMethod#141)
In 3.5 I looked on line 141 within method myMethod and I found the line that caused the problem.
Now using Eclipse I find the errorline on line 10932 and nowhere I see some reference to line 141
So please fix this.
By the way, it looks like the error is caused by incompatibilty between the I2TBE menubar in 3.5 and the Servoy menubar in 4.1.3
I’ll have to find out why I get this error
martinh:
By the way, it looks like the error is caused by incompatibilty between the I2TBE menubar in 3.5 and the Servoy menubar in 4.1.3
I’ll have to find out why I get this error
Indeed there was a case.
I2TBE menubar used .setText() method, while Servoy menubar uses .text property.
inside eclipse the line numbers should be correct of the exceptions you get (you should just be able to click on them in the log)
but on the server the line numbers are not correct if you look at the complete file, they are the linenumbers relative to the method itself. (just like 3.5 but there you wouldnt have one big file)
In 4.2 we fixed this, so also on the server you will have the right linenumbers on the server.
about your menu bar plugin. This is a know problem in 3.5 you had to do setText(xxx) but in 4.1.3 you have to do text = xxxx
in 4.1.4 we fixed this so that both variants will work.