繼承的元件install不了.. |
尚未結案
|
furesu
一般會員 發表:26 回覆:10 積分:7 註冊:2004-10-22 發送簡訊給我 |
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 發送簡訊給我 |
因為你的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 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |