代码如下,getint64prop怎么提示属性不存在?unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,typinfo;type
TTtest = class
private
fid:integer;
fname:string;
public
property id:integer read fid write fid;
end; TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
tt: TTtest;
j:integer;
begin
tt:=TTtest.Create;
tt.fid:=56782;
tt.fname:='cao';
j:=getint64prop(tt,'id');
//j:=i;
edit1.Text:=inttostr(j);
end;end.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,typinfo;type
TTtest = class
private
fid:integer;
fname:string;
public
property id:integer read fid write fid;
end; TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
tt: TTtest;
j:integer;
begin
tt:=TTtest.Create;
tt.fid:=56782;
tt.fname:='cao';
j:=getint64prop(tt,'id');
//j:=i;
edit1.Text:=inttostr(j);
end;end.
解决方案 »
- delphi 数据转换问题
- 想上一个fsStayOnTop窗体始终显示在另一个fsStayOnTop窗体上面
- 请问这个是什么问题,要怎么解决?谢谢!很急,希望大家帮一把!
- 特郁闷,谁来安慰我,谢谢各位好心人!
- 大家进来看看吧!
- 时间相减的问题,急!!!HELP
- D7 + 水晶报表9 做完程序,要打包,大家给个解决办法吧。
- 请各位帮帮忙,招聘深圳地区DELPHI程序员
- Delphi程序员求职,目的地:北京。
- 在运行期定义的对象在开发环境下运行正常,但将编译后的程序Copy到别的机就不能运行,请问是什么原因呀?
- 询问关于使用delphi获取实时外汇信息的问题--寻找接口
- DragKind如何窗体停靠?
private
fid:integer;
fname:string;
procedure SetID(Value:integer);
public
property id:integer read fid write SetID;
end;....procedure Ttest.SetID(Value:integer);
begin
FID:=Value;
end;这样就OK了.
2、尝试用编译选项{$M+}{$M-},这才是关键所在,哈
如:
{$M+}
TTtest = class
private
fid:integer;
fname:string;
published
property id:integer read fid write fid;
end;
{$M-}