[Lazarus] TTreeView events OnCreateNodeClass and OnAddition

Juha Manninen juha.manninen at phnet.fi
Fri Apr 16 18:38:05 CEST 2010


Hello,

I see the opposite comments in curly braced languages about circular 
dependencies and (lack) of reuse all the time. It's a question of <lack> 
of design which paints them into corners regularly.

The fact that the compiler enforces the acyclic properties of the 
dependency graph is, in fact, a huge advantage for the pascal programmer.

Two design techniques not mentioned in the thread, and very useful for 
thinking large scale programming are:
- the inversion of dependencies, (which leads to creating interfaces and 
abstract classes),
- the use of (self-designed) events.

Best regards,
Thierry

Juha Manninen wrote:
> Hi
>
> Circular references are a real problem in real (non-trivial) Object Pascal 
> programs. You could look at this thread:
>
> http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg16051.html
>
> The solution is to copy everything into one big unit. That's what everybody 
> finally does after fighting with interfaces, abstract base classes and type 
> casting.
>
> Juha
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>   





More information about the Lazarus mailing list