Right.

Right.

I think I have found the solution I was looking for, except that it has its issues.

These are my main packages:

Core:

requires
rtl,
vcl;

contains
Packages.Core in 'Packages.Core.pas',
Packages.Core.Form in 'Packages.Core.Form.pas' {BasePluginFrm},
Packages.Core.Registrations in 'Packages.Core.Registrations.pas';

end.

P1:

requires
rtl,
vcl,
Core;

contains
PluginPackage.Form in 'PluginPackage.Form.pas' {PluginFrm};

end.

P2:

requires
rtl,
vcl,
Core;

contains
PluginPackage2.Form in 'PluginPackage2.Form.pas' {Plugin2Frm};

end.

If I load each package singularly, it's fine - everything works as intended. BUT: if I use FindFirst...FindNext, upon loading P2 I receive the error:
"Cannot load package P2. It contains unit Packages.Core which is also contained in package Core".

That is obviously untrue, as it can be clearly seen that P2 does not contain that unit and instead references the package "Core".

Directories are setup right and P1 has the exact same setup with a practically identical uses clause.

Opinions? What's going on here?

Thanks

Comments

  1. When compiling P2, do you get any message about implicit usage of unit Packages.Core (the error messages implies that)? If so, check for a stray Core.dcp in your search path.

    ReplyDelete
  2. Right, a Core.dcp got created in c:\Users\Public\Documents\RAD Studio\8.0\Dcp\Core.dcp but I can't find what was causing that. I deleted it and made all packages Explicit Rebuid, cleaned everything and now I find only one in the right path. But I still get the same error when I load the second one in the loop. Doing it with single packages and using a TOpenDialog works fine though and both load correctly. I wonder why the behaviour is different.

    ReplyDelete
  3. Found it :) I was missing the whole path, so Doolittle knows what it was loading :) works really well now!!!

    ReplyDelete

Post a Comment