新建了一个Component,编译即出错。

kimryo 2002-10-25 10:35:36
错误是:

[Fatal Error] AutoListView.pas(1): Program or unit 'K:\Component\AutoListView.pas' recursively uses itself

我的.pas单元没有use他自身啊,这是为什么?
...全文
74 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
breezing 2002-10-28
  • 打赏
  • 举报
回复
怎么解决的?
kimryo 2002-10-27
  • 打赏
  • 举报
回复
解决了解决了!
望秋阁 2002-10-26
  • 打赏
  • 举报
回复
你贴出来的这个 unit 没有问题呀
看看是不是别的地方出了问题
kimryo 2002-10-26
  • 打赏
  • 举报
回复
直接用Collection[0],Collection[1]。

BCB不能像Delphi那样写把。
kimryo 2002-10-25
  • 打赏
  • 举报
回复
AutoListView.pas的内容如下:


unit AutoListView;

interface

uses
Windows, Messages, SysUtils, Classes, ComCtrls, ExtCtrls,
Menus, StdCtrls;

type
TAutoListView = class(TListView)
private
{ Private declarations }
protected
m_Edit:TEdit;
m_ComboBox:TComboBox;
public
{ Public declarations }
published
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('Additional', [TAutoListView]);
end;

end.
Snakeguo 2002-10-25
  • 打赏
  • 举报
回复
'K:\Component\AutoListView.pas' 循环引用了自身
breezing 2002-10-25
  • 打赏
  • 举报
回复
是你use的单元又use了它
把use放在implementation后吧


'K:\',你的盘符够多的!

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧