[Lazarus] Buttons in frames
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun Feb 3 14:48:20 CET 2013
On Sun, 03 Feb 2013 13:13:21 +0000
Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
> Mattias Gaertner wrote:
>
> >>>> but I now have two tabbed panes in my source editor: "DbConfigCode2" and
> >>>> "DbConfigCode2(2)" with the latter focussed.
> >>> And that's where you loose me.
> >>> Why should /usr/local/src/inifiles/trunk/dbconfigcode2.pas be open in
> >>> the editor? From the project's point of view it is an unrelated file.
> >> You tell me! But the IDE opens a new tab/pane, and that's the whole
> >> point I'm trying to make!
> >
> > Sorry.
> > The IDE does not resolve symlinks in paths. That means if the IDE
> > opens a wrong file, then it does so, even if the two directories were
> > copies instead of symlinks. Your talk about a problem with symlinks
> > mislead me.
>
> Don't worry, it was some while before I started focusing on what the
> real problem was.
>
> To add context for the error message, the error I've forced in looks like
>
> -----8<-----
> type TDbConfigInit= procedure(confFrame: TDbConfigFrame; init:
> boolean= true);
> TDbConfigRead= function(confFrame: TDbConfigFrame; mr:
> TModalResult): boolean;
>
> ty pe // Line 22
>
> { TDbConfigFrame }
>
> TDbConfigFrame = class(TFrame)
> ----->8-----
>
> > So, let's forget the symlinks and find out why the IDE opens the wrong
> > file.
> >
> > Please confirm:
> > The messages window shows an error on the file
> > /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas
>
> /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas(22,4)
> Fatal: Syntax error, "=" expected but "identifier PE" found
>
> > but the source editor opens the file
> > /usr/local/src/inifiles/trunk/dbconfigcode2.pas
> > Right?
>
> I think so, or at the very least it opens a new tab/pane so that I've
> now got tabs labeled "DbConfigCode2" and "DbConfigCode2(2)".
> "Information about the IDE" tells me
>
> Project.SomethingModified Session
>
> Project units:
> ./../inifiles/trunk/dbconfigcode2.pas SessionModified
Is this "../../" or really "./../" ?
> Project units:
> ./../inifiles/trunk/dbconfigcode.pas SessionModified
>
> which based on the project directory being
> /usr/local/src/heavywethers/trunk implies
> /usr/local/src/inifiles/trunk/dbconfigcode2.pas (I'm trying to be
> cautious jumping to conclusions here).
see above.
> Source -> Unit Information -> General on the new DbConfigCode2(2) tab
> tells me /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas
> [manual transcript] which is what the file should be.
ok
> ... Unit paths
> refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source
> paths ditto.
ok
> But Source -> Unit Information -> General on the original DbConfigCode2
> tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which
> is wrong.
What is this "original"? When is it opened?
In my former mails I assumed you had opened it yourself.
> I need to be very cautious about jumping to any conclusions over this
> (having already been wrong once), but it looks as though the compiler is
> getting and reporting the right path
>
> Compiling /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas
yes.
> but the IDE at some earlier stage has resolved it to
> /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't.
What is this "some earlier stage"?
> That
> actually fits my experience that given that sort of duplicate tab it's
> safer to close the older one.
>
> If I close the older tab/pane, save-all and terminate then restart, the
> one tab that's displayed relating to that file has the correct name
> /usr/local/src/heavywethers/inifiles/trunk/dbconfigcode2.pas.
All tabs are named uniquely. If you open two units with the same name
one will get the "(2)" appended. The "(2)" vanishes when the name
becomes unique again.
> I think it's worth noting that since I updated this copy of the IDE etc.
> to trunk (i.e. rather than it being a couple of weeks old) I'm seeing
> additional startup warnings
>
> FindMissingClass DbConfigFrame1:TDbConfigFrame IsInherited=False
> TLazSourceFileManager.LoadLFM loading nested class TDbConfigFrame needed
> by /usr/local/src/inifiles/trunk/dbconfigcode.pas
It simply means: This form is opened and needs some frame of another
unit.
> However I think that's something to do with the non-working OnClick
> which I'll get back to presently, this business with tab/pane
> duplication is at least a few weeks old.
Mattias
More information about the Lazarus
mailing list