In a package, I have a component which implements the ToolAPi IOTAIDENotifier Interface. The package can be setup, compiled and appears on the palette. A method of this component is designed to do something particular when a project, which uses it, is compiled (and not executed)...so far everything if OK.

The problem appears later, when I use this component on a TForm which belongs to another project. When I try to build it, I get the compiler message File not found: ToolsAPI.dcu.

Here are the uses of the package:

Uses
  {$IFDEF PACKAGESETUP} DesignIntf, DesignEditors,{$ENDIF}
  Classes, ToolsAPI;

PACKAGESETUP is only defined when I compile the bpl

When I double click the error message, the IDE opens the file from which is declared the reference to ToolsAPI...How can I get rid of this problem ?

有帮助吗?

解决方案

ToolsAPI is only available in designtime packages. It exists to expose the IDE for customisation and so is available only under the IDE, i.e. in designtime packages. You will have to remove the reference to ToolsAPI from your desktop app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top