On Mon, 9 Apr 2007 12:11:30 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> On 4/9/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > > > Are there any circle dependencies or inlines in fpGUI?
> > > >
> > >
> > > No circle dependencies that I can see. The only unit that is
> > > referencing the StyleManger should be fpgui.pas (in the
> > > Implementation uses clause).
> >
> > That's what I meant. fpGui is creating a unit circle with
> > StyleManager. And even worse: it uses inlines.
> > Break the circles and the error will vanish.
>
> I don't really understand what is wrong? In the Object Pascal
> language, it is perfectly legal for two units to reference each other,
> as long as one reference is in the Interface section and the other
> reference is in the Implementation section. This is what I have done
> in fpGUI.
Not everything legal works.
I guess, you can call it a compiler bug. Since I know fpc it does
not like unit circles (legal or illegal). Because I don't like them
neither, I treat this a warning instead of a bug. ;)
With 'inlines' it became worse. If you want to know the gory details
search the fpc mailing lists (e.g. mac-pascal subject 'recompiling
for no reason (it seems)').
Mattias
> An invalid circle reference is when both units try and reference each
> other in the Interface section.
>
> Either way, I'll try and see if I can remove both units referencing
> each other, but I don't think it is possible. fpgui.pas contains all
> the widgets including the TStyleAbs (abstract TStyle object). The
> widgets refer to their default Style by requesting it from
> gStyleManager (in StyleManager.pas). gStyleManager is a factory class
> which all available styles register with. All concrete styles descend
> from TStyleAbs. As I said before, I don't know what is wrong,
> because what I am doing is perfectly legal Object Pascal syntax.
>
>
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives