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
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).

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. ... Unit paths refers to /usr/local/src/heavywethers/inifiles/trunk which is OK. Source paths ditto.

But Source -> Unit Information -> General on the original DbConfigCode2 tab tells me it's /usr/local/src/inifiles/trunk/dbconfigcode2.pas which is wrong.

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

but the IDE at some earlier stage has resolved it to /usr/local/src/inifiles/trunk/dbconfigcode2.pas which it shouldn't. 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.

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

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.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to