Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-02

Codetool error

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hello,

A reproducible bug report:

I have a method with the following in it:

    stCreate : begin
               Result:=Format('INSERT INTO %s (',[TN]);
               end;

When my cursor is in the method (in fact any method) and I do a ctrl-alt-up to switch to the implementation, I get a codetools error: file.pp(row,col) Error: bracket ) not found
and the cursor is positioned on the ( bracket.

Which is kind of strange given that the bracket is inside a string constant.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 14 lines
Hello, A reproducible bug report: I have a method with the following in it: stCreate : begin Result:=Format('INSERT INTO %s (',[TN]); end; When my cursor is in the method (in fact any method) and I do a ctrl-alt-up to switch to the implementation, I get a codetools error: file.pp(row,col) Error: bracket ) not found and the cursor is positioned on the ( bracket.

It works here.
Do you have a complete example?

Which is kind of strange given that the bracket is inside a string constant.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 20 lines
On Thu, 28 Feb 2013 17:35:11 +0100 (CET) Michael Van Canneyt wrote: > Hello, > > A reproducible bug report: > > I have a method with the following in it: > > stCreate : begin > Result:=Format('INSERT INTO %s (',[TN]); > end; > > When my cursor is in the method (in fact any method) and I do a ctrl-alt-up to > switch to the implementation, I get a codetools error: > file.pp(row,col) Error: bracket ) not found > and the cursor is positioned on the ( bracket. It works here. Do you have a complete example?

Sent in private.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 26 lines
On Thu, 28 Feb 2013, Mattias Gaertner wrote: > On Thu, 28 Feb 2013 17:35:11 +0100 (CET) > Michael Van Canneyt wrote: > >> Hello, >> >> A reproducible bug report: >> >> I have a method with the following in it: >> >> stCreate : begin >> Result:=Format('INSERT INTO %s (',[TN]); >> end; >> >> When my cursor is in the method (in fact any method) and I do a ctrl-alt-up to >> switch to the implementation, I get a codetools error: >> file.pp(row,col) Error: bracket ) not found >> and the cursor is positioned on the ( bracket. > > It works here. > Do you have a complete example? Sent in private.

Works here.
What command is ctrl-alt-up? I thought this might be Ctrl-Shift-Up.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 32 lines
On Thu, 28 Feb 2013 19:43:31 +0100 (CET) Michael Van Canneyt wrote: > > > On Thu, 28 Feb 2013, Mattias Gaertner wrote: > >> On Thu, 28 Feb 2013 17:35:11 +0100 (CET) >> Michael Van Canneyt wrote: >> >>> Hello, >>> >>> A reproducible bug report: >>> >>> I have a method with the following in it: >>> >>> stCreate : begin >>> Result:=Format('INSERT INTO %s (',[TN]); >>> end; >>> >>> When my cursor is in the method (in fact any method) and I do a ctrl-alt-up to >>> switch to the implementation, I get a codetools error: >>> file.pp(row,col) Error: bracket ) not found >>> and the cursor is positioned on the ( bracket. >> >> It works here. >> Do you have a complete example? > > Sent in private. Works here. What command is ctrl-alt-up? I thought this might be Ctrl-Shift-Up.

Sorry. I meant of Ctrl-Shift-Up.

From the lazarus log:

### TCodeToolManager.HandleException: "bracket ) not found" at Line=2603 Col=46 in "/data/mailjet/svn/api/tools/mjcodegen.pp"

But I must say that the code tools lately have been behaving strangely: e.g. when adding a new unit to a project, nothing of that unit is found in other units. Only after a save and reload of the project, things are found.

Is there anything I can do to help in testing ?

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 41 lines
On Thu, 28 Feb 2013, Mattias Gaertner wrote: > On Thu, 28 Feb 2013 19:43:31 +0100 (CET) > Michael Van Canneyt wrote: > >> >> >> On Thu, 28 Feb 2013, Mattias Gaertner wrote: >> >>> On Thu, 28 Feb 2013 17:35:11 +0100 (CET) >>> Michael Van Canneyt wrote: >>> >>>> Hello, >>>> >>>> A reproducible bug report: >>>> >>>> I have a method with the following in it: >>>> >>>> stCreate : begin >>>> Result:=Format('INSERT INTO %s (',[TN]); >>>> end; >>>> >>>> When my cursor is in the method (in fact any method) and I do a ctrl-alt-up to >>>> switch to the implementation, I get a codetools error: >>>> file.pp(row,col) Error: bracket ) not found >>>> and the cursor is positioned on the ( bracket. >>> >>> It works here. >>> Do you have a complete example? >> >> Sent in private. > > Works here. > What command is ctrl-alt-up? I thought this might be Ctrl-Shift-Up. Sorry. I meant of Ctrl-Shift-Up. >From the lazarus log: ### TCodeToolManager.HandleException: "bracket ) not found" at Line=2603 Col=46 in "/data/mailjet/svn/api/tools/mjcodegen.pp"

That's an empty line.

But I must say that the code tools lately have been behaving strangely: e.g. when adding a new unit to a project, nothing of that unit is found in other units.

Do you mean File / New unit?
As soon as you save the unit, for example in the project directory, it should be found by other units in this directory.

Only after a save and reload of the project, things are found. Is there anything I can do to help in testing ?

Mattias

Reply by email

zeljko
to Mattias Gaertner: On Thu, 28 Feb 2013 17:35:11 +0100 (CET) It works here. Do you have a complete example?…
Mattias Gaertner wrote 20 lines
On Thu, 28 Feb 2013 17:35:11 +0100 (CET) Michael Van Canneyt wrote: > Hello, > > A reproducible bug report: > > I have a method with the following in it: > stCreate : begin > > Result:=Format('INSERT INTO %s (',[TN]); > end; > > When my cursor is in the method (in fact any method) and I do a > ctrl-alt-up to switch to the implementation, I get a codetools error: > file.pp(row,col) Error: bracket ) not found > and the cursor is positioned on the ( bracket. It works here. Do you have a complete example?

I've spotted same problem with brackets (eg brackets inside comments. if there's only one bracket I get similar error).

zeljko

Reply by email

Mattias Gaertner
to zeljko
Show quoted text 24 lines
On Thursday 28 of February 2013 18:44:00 Mattias Gaertner wrote: > On Thu, 28 Feb 2013 17:35:11 +0100 (CET) > > Michael Van Canneyt wrote: > > Hello, > > > > A reproducible bug report: > > > > I have a method with the following in it: > > stCreate : begin > > > > Result:=Format('INSERT INTO %s (',[TN]); > > end; > > > > When my cursor is in the method (in fact any method) and I do a > > ctrl-alt-up to switch to the implementation, I get a codetools error: > > file.pp(row,col) Error: bracket ) not found > > and the cursor is positioned on the ( bracket. > > It works here. > Do you have a complete example? I've spotted same problem with brackets (eg brackets inside comments. if there's only one bracket I get similar error).

Is this reproducable?

Mattias

Reply by email