BCB 是否支持静态属性?
勉励前行 2011-05-16 09:11:19 delphi是支持静态属性的,但我在BCB中找不出对应的写法.
class A
{
static String fv ;
static String GetValue() {return fv ; }
static void SetValue(String v) {fv = v ;}
public :
__property String Value = { read = GetValue , write = SetValue }; //这样写会发生内部的编译错误..
static __property String Value = { read = GetValue , write = SetValue }; //这样写也不行
//不知道怎样写了
};
delphi代码:
A = class
private
class procedure SetValue(const Value: string);
class function GetValue: string;
...//省略
published
property Value: string read GetValue write SetValue;
end;
//想知道 是否BCB 不支持静态的属性这个概念,还是编译器错误.
[BCC32 Error] Unit5.cpp(23): F1004 Internal compiler error at 0x5b5d3d7 with base 0x5b20000
BCB2007给出这样的编译信息,看不出什么问题.