* * *

Author Topic: OnGutterClick "mark" parameters is always Nil  (Read 401 times)

Michael Collier

  • Full Member
  • ***
  • Posts: 211
OnGutterClick "mark" parameters is always Nil
« on: July 13, 2017, 11:02:57 am »
The "mark" parameter in the OnGutterClick event is always showing as Nil.

I'm using the example lazarus project SynGutterMarkExample to create the marks. The code below shows how I catch the vent.

(The X,Y values seem valid though. So I can work from that if I have to I guess.)

Code: Pascal  [Select]
  1. procedure TForm1.SynEdit1GutterClick(Sender: TObject; X, Y, Line: integer;
  2.   mark: TSynEditMark);
  3. begin
  4.   if ( mark = nil ) then begin
  5.    beep; // this always fires
  6.   end;
  7. end;

BBasile

  • Sr. Member
  • ****
  • Posts: 319
Re: OnGutterClick "mark" parameters is always Nil
« Reply #1 on: August 13, 2017, 03:32:31 am »
Do you create marks at least ?

BBasile

  • Sr. Member
  • ****
  • Posts: 319
Re: OnGutterClick "mark" parameters is always Nil
« Reply #2 on: August 13, 2017, 03:36:34 am »
Actually you're right. Just tested when removing a breakpoint in my IDE, although it works for me because i store them in a data structure.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus