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

Bo Berglund bo.berglund at gmail.com
Sat May 11 23:57:47 CEST 2019


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



More information about the lazarus mailing list