[Lazarus] Mouse Link in SynEdit (only link-able items)

Martin Friebe lazarus at mfriebe.de
Fri Dec 12 11:38:51 CET 2008

Alexander Klenin wrote:
>> Zitat von Alexander Klenin <klenin at gmail.com>:
>>> I should note that I was horrified by the amount of "glue" code needed
>>> to route an event through main form, source notebook, source editor and
>>> SynEdit.
>> The IDE is structured in a hierarchy.
>> mainide: the top level of the IDE and the central nerve system. Because of its
>> size it's splitted into several units.
> Oh, hierarchy is good in itself -- it is not what I am ranting about.
> (Although I'd say that main.pp, at 15000 lines, is in dire need of
> further splitting).
> However, to add another event to SynEdit, I had to add two useless events
> and two useless event handlers, totally containing more code then the
> original event
> -- simply to marshal the call through the hierarchy (see patch in the
> issue for details).
> This is IMHO not optimal design ;-)
I haven't seen the patch? Can you check you really attached it.

As for the events... There is probably (I haven't seen the code) another 
way: Pass the callback through to synedit. IDE gives a callback to 
SourceNotebook. But that does not mean that SourceNotebook has to be the 
one who calls it. It can just pass the Method-Reference to SourcEditor, 
which passes it to SynEdit.
Source Notebook still needs to keep a copy, as it may open further 


More information about the Lazarus mailing list