Recent

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

Michael Collier

  • Sr. Member
  • ****
  • Posts: 301
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;

guest58172

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

guest58172

  • Guest
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.

 

TinyPortal © 2005-2018