|
@@ -1232,16 +1232,21 @@ end;
|
|
|
|
|
|
Function GetMethodProp(Instance : TObject;PropInfo : PPropInfo) : TMethod;
|
|
Function GetMethodProp(Instance : TObject;PropInfo : PPropInfo) : TMethod;
|
|
type
|
|
type
|
|
- TGetMethodProcIndex=function(index:longint):PMethod of object;
|
|
|
|
- TGetMethodProc=function():PMethod of object;
|
|
|
|
|
|
+ TGetMethodProcIndex=function(Index: Longint): TMethod of object;
|
|
|
|
+ TGetMethodProc=function(): TMethod of object;
|
|
var
|
|
var
|
|
value: PMethod;
|
|
value: PMethod;
|
|
AMethod : TMethod;
|
|
AMethod : TMethod;
|
|
begin
|
|
begin
|
|
- Value:=nil;
|
|
|
|
|
|
+ Result.Code:=nil;
|
|
|
|
+ Result.Data:=nil;
|
|
case (PropInfo^.PropProcs) and 3 of
|
|
case (PropInfo^.PropProcs) and 3 of
|
|
ptfield:
|
|
ptfield:
|
|
- Value:=PMethod(Pointer(Instance)+Longint(PropInfo^.GetProc));
|
|
|
|
|
|
+ begin
|
|
|
|
+ Value:=PMethod(Pointer(Instance)+Longint(PropInfo^.GetProc));
|
|
|
|
+ if Value<>nil then
|
|
|
|
+ Result:=Value^;
|
|
|
|
+ end;
|
|
ptstatic,
|
|
ptstatic,
|
|
ptvirtual :
|
|
ptvirtual :
|
|
begin
|
|
begin
|
|
@@ -1251,18 +1256,11 @@ begin
|
|
AMethod.Code:=PPointer(Pointer(Instance.ClassType)+Longint(PropInfo^.GetProc))^;
|
|
AMethod.Code:=PPointer(Pointer(Instance.ClassType)+Longint(PropInfo^.GetProc))^;
|
|
AMethod.Data:=Instance;
|
|
AMethod.Data:=Instance;
|
|
if ((PropInfo^.PropProcs shr 6) and 1)<>0 then
|
|
if ((PropInfo^.PropProcs shr 6) and 1)<>0 then
|
|
- Value:=TGetMethodProcIndex(AMethod)(PropInfo^.Index)
|
|
|
|
|
|
+ Result:=TGetMethodProcIndex(AMethod)(PropInfo^.Index)
|
|
else
|
|
else
|
|
- Value:=TGetMethodProc(AMethod)();
|
|
|
|
|
|
+ Result:=TGetMethodProc(AMethod)();
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
- if Value=nil then
|
|
|
|
- begin
|
|
|
|
- Result.Code:=nil;
|
|
|
|
- Result.Data:=nil;
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- Result:=Value^;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -1438,7 +1436,10 @@ end;
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.25 2004-05-24 21:05:19 florian
|
|
|
|
|
|
+ Revision 1.26 2004-06-02 14:33:18 michael
|
|
|
|
+ + Patch from matthias gaertner to fix GetMethodProp with procedural spec
|
|
|
|
+
|
|
|
|
+ Revision 1.25 2004/05/24 21:05:19 florian
|
|
* fixed comp property writing for cpus where comp=int64
|
|
* fixed comp property writing for cpus where comp=int64
|
|
|
|
|
|
Revision 1.24 2004/05/23 19:00:40 florian
|
|
Revision 1.24 2004/05/23 19:00:40 florian
|