[Lazarus] Lazarus throws error when trying to open an event procedure from the form

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus throws error when trying to open an event procedure from the form

Free Pascal - Lazarus mailing list
FPC 3.0.4 / Lazarus 2.0.0 32 bit on Windows 7 x64

A project that builds without errors or warnings throws up an error
dialog whenever in order to see its event function I do:
1) Doubleclick a button in the form view
2) Select the button, then use the events tab in object inspector to
open OnClick

The error box says:

Unable to show method. Please fix the error shown in
the message window which is normally below the
source editor.


And the message window has this:

Codetools, Errors: 1
formmain.pas(119,4) Error: End of source not found.

The editor cursor is set here (which is NOT where I wantde to get to):

procedure TfrmMain.vlcPlayerMediaPlayerTimeChanged(Sender: TObject;
time: Int64);
begin
  if trkPosition.Tag = 0 then // not dragging with mouse
    trkPosition.Position := vlcPlayer.GetVideoPosInMs();
  lblTime.Caption := vlcPlayer.GetVideoPosStr('hh:mm:ss.ms');
end;


Still as I said the project has no errors and builds just fine, why
this message?

If I close Lazarus and then start it over again, then this strange
behaviour is not repeated.....

Do I need to file a bug report or is this just a natural thing like
restarting Windows to fix issues?

--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus throws error when trying to open an event procedure from the form

Free Pascal - Lazarus mailing list
On 11.05.2019 23:57, Bo Berglund via lazarus wrote:
> Do I need to file a bug report or is this just a natural thing like
> restarting Windows to fix issues?

It's already been reported: https://bugs.freepascal.org/view.php?id=35289

Ondrej

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus throws error when trying to open an event procedure from the form

Free Pascal - Lazarus mailing list
On Sun, 12 May 2019 08:59:33 +0200, Ondrej Pokorny via lazarus
<[hidden email]> wrote:

>It's already been reported: https://bugs.freepascal.org/view.php?id=35289
>

Thanks for the info!
So I checked the ticket when I had the same problem reappear again
today. Turns out that when the problem is "active" I tested (as
suggested in the ticket comments) adding the following immediately
below implementation:
uses
  Types;

Then I tested again to get to the event function by doubleclicking the
button and now it worked fine!
And that is without restarting Lazarus.

So it is definitely something fishy going on with codetools.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus