[lazarus] Circle dependencies in the lcl

Shane Miller SMiller1 at stvgb.org
Tue Jan 16 12:32:50 EST 2001

I think clean up of the LCL is needed but I'm not sure if it should be our priority at this point.  Clean up of code and functions in the LCL could be done but changing the way the units are structured could be put off until later.


>>> nc-gaertnma at netcologne.de 01/15/01 09:25AM >>>
Hi all,

I want to discuss a structure problem in the LCL.
This is nothing new:
There some circle dependencies in the LCL. For example
Although the compiler can handle this, there are some problems. Some weeks
ago this was hidden with funny tricks like "make -C lcl" 6 times. Then a new
trick was invented: -Ca. AFAIK this prevents some optimization.
I believe it is bad coding to program circle dependencies. A circle is an
important sign that code should be gathered in one unit.

Case 1:
  graphics.pp <-> controls.pp
    Even Delphi avoids this. This circle can easily be destroyed.
    Move the procedure CN_SendMessage from
    controls.pp to lmessages.pp.

Case 2:
  controls <-> dialogs
    Why does controls depend on dialogs?

Case 3:
  forms.pp <-> controls.pp
    Delphi has the same problem. The LCL should be
    very similar to the VCL, but of course we don't
    want to copy the problems, do we?
    The dependency is TWinControl<->TCustomForm.
    To distribute them to two units is a design

What do you think?


     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus

More information about the Lazarus mailing list