線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:930
推到 Plurk!
推到 Facebook!

繼承的元件install不了..

尚未結案
furesu
一般會員


發表:26
回覆:10
積分:7
註冊:2004-10-22

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-11-11 17:16:06 IP:221.169.xxx.xxx 未訂閱
unit testTDBText1;    interface    uses
  SysUtils, Classes, Controls, StdCtrls, DBCtrls;    type
  testTDBText1 = class(TDBText)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    { Published declarations }
  end;    procedure Register;    implementation    procedure Register;
begin
  RegisterComponents('test', [testTDBText1]);
end;    end.
在試作TEdit的繼承是ok的, 可是要作繼承一TDBEdit 每次install都會掛在testTDBText1 = class(TDBText) 這行...why 錯誤訊息 [Error] testTDBText1.pas(9): Identifier redeclared: 'testTDBText1' [Error] testTDBText1.pas(26): '.' expected but ']' found
l630521
資深會員


發表:15
回覆:349
積分:372
註冊:2003-02-17

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-11-11 17:45:17 IP:203.73.xxx.xxx 未訂閱
因為你的Unit name 程你的Class名稱一樣
unit testTDBText1;    interface    uses
  SysUtils, Classes, Controls, StdCtrls, DBCtrls;    type
  testTDBText1 = class(TDBText)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    { Published declarations }
  end;    procedure Register;    implementation    procedure Register;
begin
  RegisterComponents('test', [testTDBText1]);
end;    end.
請改其中一個 Ian
系統時間:2024-05-19 18:17:45
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!