[Lazarus] IDE package interface question

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Tue Jan 25 01:08:30 CET 2011


On Jan 25, 2011, at 1:03 AM, Mattias Gaertner wrote:

> On Tue, 25 Jan 2011 00:51:07 +0100
> Darius Blaszyk <dhkblaszyk at zeelandnet.nl> wrote:
> 
>> What I would like to do is to update a listview (in my package) after I click on the source editor. So I need to hook into the source editor's OnClick method and get the procedure/function name, line number and the file name. The last two items will probably be more easy, but what about the first? Is there an interface for the code tools that allows this? How about hooking into the OnClick method of the source editor?
> 
> With OnClick I guess you mean left click?
> Why only update on click? 
> Why not update after every cursor movement on a second idle?

You're right, it should be on every cursor movement. So how can I trigger the update when the cursor moves? I had a look at the wiki, but the code did not give any hints on that as far as I could see.


> About method name:
> maybe you mean something like ide/codetemplatesdl.pas function
> CodeMacroProcedureHead.
Thanks, will have a look.

Darius



More information about the Lazarus mailing list