Page 1 of 1

Need line numbers for methods

PostPosted: Sat Dec 20, 2008 12:09 am
by amcgilly
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?

Re: Need line numbers for methods

PostPosted: Sat Dec 20, 2008 1:38 pm
by IT2Be
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 <ctrl><L> or <apple><l> and type in the line number).

Re: Need line numbers for methods

PostPosted: Sat Dec 20, 2008 3:16 pm
by ryanparrish
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 would like to know the answer to this also.

Re: Need line numbers for methods

PostPosted: Sat Dec 20, 2008 3:38 pm
by ROCLASI
Hi Ryan/Adrian,

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 ?

Re: Need line numbers for methods

PostPosted: Sun Dec 21, 2008 5:56 pm
by ryanparrish
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.

Re: Need line numbers for methods

PostPosted: Mon Dec 22, 2008 11:17 am
by IT2Be
This behavior is exhibited in smart client in a deployed solution
In that case I would create a ticket in the support system.
Hopefully they can solve this.

Re: Need line numbers for methods

PostPosted: Tue Dec 23, 2008 1:52 am
by amcgilly
I will create a case in the support system. Thanks.

Re: Need line numbers for methods

PostPosted: Tue Jan 06, 2009 12:53 am
by jcompagner
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

Re: Need line numbers for methods

PostPosted: Tue Jan 06, 2009 12:57 am
by IT2Be
I have now seen it myself as well.

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.

Re: Need line numbers for methods

PostPosted: Tue Jan 06, 2009 1:24 am
by ryanparrish
IT2Be wrote:I have now seen it myself as well.

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 ;)

Re: Need line numbers for methods

PostPosted: Tue Jan 06, 2009 1:26 am
by IT2Be
For a second there was I starting to think Marcel was some super programer that has never had an exception in deployed code
I am not sure that I should see this as a compliment or not.
Only for a second ;)

Re: Need line numbers for methods

PostPosted: Thu May 28, 2009 10:45 am
by martinh
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

Re: Need line numbers for methods

PostPosted: Thu May 28, 2009 10:53 am
by martinh
martinh wrote: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.

Re: Need line numbers for methods

PostPosted: Thu May 28, 2009 10:55 am
by jcompagner
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.