type
TWgComponent = class(TCustomControl)
private
FArrProp:array of string; protected
procedure SetArrProp(aStr:string);
function GetArrProp(aIndex:integer):string;
public published
property ArrProp:string read GetArrProp write SetArrProp;
end;
我自己定义的一个控件(作来玩的),但在编译时,属性定义那一行总是
错误:Incompatible types
读写方法我都实现了。
请问,到底是哪儿有问题.
TWgComponent = class(TCustomControl)
private
FArrProp:array of string; protected
procedure SetArrProp(aStr:string);
function GetArrProp(aIndex:integer):string;
public published
property ArrProp:string read GetArrProp write SetArrProp;
end;
我自己定义的一个控件(作来玩的),但在编译时,属性定义那一行总是
错误:Incompatible types
读写方法我都实现了。
请问,到底是哪儿有问题.
解决方案 »
- 求救如何像360网络连接状态的获得。。
- 在DELPHI裡Ctrl+F7/Ctrl+F8/Ctrl+F10的值是????
- 怎么把把IP地址转换成十六进制(DWORD)类型??
- 一个简单问题高分求解………………!!
- 请问哪里可以找到这些代码?
- 请问如何在QRedort里实现多栏目的明细主从打印??急!!!在线等
- 风子.阿德. 高手....每月专家榜是不是当月在某论坛得分的排名呀?
- 怎么模仿打印服务,在局域网里发送一段自己的信使服务的广播啊?
- DLL中的数据库连接问题?拉兄弟一把阿!
- C++代码翻译
- Agent不反应我的动作怎么回事?
- win32页下的PageScroller 是如何使用,动态时呢?
Property accessIn a read specifier, if fieldOrMethod is a method, it must be a parameterless function whose result type is the same as the property's type.In a write specifier, if fieldOrMethod is a method, it must be a procedure that takes a single value or const parameter of the same type as the property.For example, given the declarationproperty Color: TColor read GetColor write SetColor;the GetColor method must be declared asfunction GetColor: TColor;and the SetColor method must be declared as one of these:procedure SetColor(Value: TColor);procedure SetColor(const Value: TColor);(The name of SetColor's parameter, of course, doesn抰 have to be Value.)所以你改为:
function GetArrProp:string;
就可以了!