请问怎样作出和 adotable.tablename 或 table.tablename 样式的控件属性
它不是strings 我看像是枚举类型的!!还有
Flist: Tstrings;
...
porperty list: Tstrings read Flist write Flist;
constructor create(Awoner: Tcomponent)
begin
....
Flist:=Tstringlist.create;
end;
为什么在设计时点击list后向框内输入数据 后包v什么什么.dll错误 不解呀
它不是strings 我看像是枚举类型的!!还有
Flist: Tstrings;
...
porperty list: Tstrings read Flist write Flist;
constructor create(Awoner: Tcomponent)
begin
....
Flist:=Tstringlist.create;
end;
为什么在设计时点击list后向框内输入数据 后包v什么什么.dll错误 不解呀
TTable是这样申明的:
property TableName: TFileName
TFileName = type string;
所以 TableName 不是枚举类型问题二:
TStrings是虚函数类,c++中的虚类,是不能直接定义该类型的,应该使用TStringList
tablename是TFileName类型。而TFileName = type string; 所以可以把其看作为string型。
在DBtables单元:
property TableName: TFileName read FTableName write SetTableName;
1、adotable.tablename 是个String类型的数据,并不是你说的像枚举。2、
"porperty list: Tstrings read Flist write Flist; //"这样改一下:
porperty list: Tstrings read Flist write FSetlist;//对于一个对象,最好用写方法,而不要直接访问私有变量,否则易造成内存泄漏。 procedure FSetList(Value);//写入方法的实现
begin
if Assigned(Value) then
FList.Assgin(Value);
end;
constructor create(AOwner:TComponent);
begin
inherited;
FList:=TStringList.Create;
.......
end;
destructor destroy;
begin
FList.Free;
inherited;
end;
提示 ABstract Error