Delphi自定义组件,项目中涉及到tpropertyeditor时使用

发布于 2024-10-08 13:17:11 字数 190 浏览 9 评论 0原文

我在运行用 Delphi CodeGear 构建的包含我自己的组件的项目时遇到问题。他们(组件)使用 propertyeditors,所以我使用 designide.dcp,编译良好并且组件出现在工具箱上。但是,当我在新项目中使用它们时,我无法启动它。它说“‘dcc’退出,代码为 1”?!我还将该包包含在运行时包中的项目中,因为否则它不会编译。请帮忙,任何人都可以

i have a problem with running my project built in Delphi CodeGear containing my own components. They (the components) use propertyeditors, so I use designide.dcp, and this compiles well and the components appear on the toolbox. But, when I use them in a new project, i can't start it. It says " 'dcc' exited with code 1" ?! I also included the package in the project in runtime packages because it didn't compile otherwise. Help, anyone, please

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我不吻晚风 2024-10-15 13:17:11

您可能正在将 TPropertyEditor 编译到标记为仅运行时的包中。

最好的解决方案是创建两个包,一个仅包含组件代码并标记为运行时包,另一个标记为设计时包,需要以前的运行时并包含 TPropertyEditor。

除此之外,您可以编译单个包,但将包标记为运行时和设计时。

有关其布局的简单示例,请参阅此处的文章:

http:// /blogs.embarcadero.com/nickhodges/2010/01/06/39345

及其引用的代码,此处:

http://sourceforge.net/projects/tsmiley/

You probably are compiling the TPropertyEditor into a package that is marked runtime only.

The best solution is to create two packages, one that contains only the component code and that is marked as a runtime package, and the other that is marked as design-time, requires your previous runtime, and contains the TPropertyEditor.

Short of that, you can compile a single package but mark the package both runtime and design-time.

For a simple example of how it is laid out, see the article here:

http://blogs.embarcadero.com/nickhodges/2010/01/06/39345

and the code it refernces, here:

http://sourceforge.net/projects/tsmiley/

那小子欠揍 2024-10-15 13:17:11

我不知道这个错误到底是什么意思,但我在 这个 QC 调用中找到了它。这似乎是一个类似“文件未找到”的错误。

我认为您的组件已安装,但 dcus 和/或运行时包丢失或位于无法找到的路径中。

当您使用运行时包进行编译时它可以工作,这一事实也表明该包无法编译为可执行文件。但我不确定“错误 1”是否意味着“找不到文件”。编译器是否提供任何附加信息?

I don't know exactly what this error means, but I found it in this QC call. It seems to be a 'file not found'-like error.

I think your component is installed, but the dcus and/or runtime package are missing or are in a path that cannot be found.

The fact that it works when you compile with runtime packages also suggests that the package cannot be compiled into the executable. I'm not sure that 'error 1' means 'file not found' though. Does the compiler give any additional information?

紫南 2024-10-15 13:17:11

安装组件和/或组件包是其中一个步骤。您还必须确保 Delphi IDE 中的环境路径指向组件的源文件。
仔细检查组件源文件的路径以及delphi源中toolsapi的路径是否存在

Installing a component and/or component package is one step. You must also be sure that the Evironment Path in your Delphi IDE is pointing to the source files for the component.
Double check that the path to your component source files is there, as well as the path to the toolsapi in the delphi source

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文