+ make TObject.Dispatch and DispatchStr virtual, patch by Paul Ishenin, resolves #14920

git-svn-id: trunk@13962 -
This commit is contained in:
florian 2009-10-28 19:22:29 +00:00
parent 461fde4ed0
commit 84c84b4964

View File

@ -54,6 +54,8 @@
vmtAfterConstruction = vmtMethodStart+sizeof(pointer)*5; vmtAfterConstruction = vmtMethodStart+sizeof(pointer)*5;
vmtBeforeDestruction = vmtMethodStart+sizeof(pointer)*6; vmtBeforeDestruction = vmtMethodStart+sizeof(pointer)*6;
vmtDefaultHandlerStr = vmtMethodStart+sizeof(pointer)*7; vmtDefaultHandlerStr = vmtMethodStart+sizeof(pointer)*7;
vmtDispatch = vmtMethodStart+sizeof(pointer)*8;
vmtDispatchStr = vmtMethodStart+sizeof(pointer)*9;
{ IInterface } { IInterface }
S_OK = 0; S_OK = 0;
@ -113,6 +115,8 @@
vAfterConstruction: Pointer; vAfterConstruction: Pointer;
vBeforeDestruction: Pointer; vBeforeDestruction: Pointer;
vDefaultHandlerStr: Pointer; vDefaultHandlerStr: Pointer;
vDispatch: Pointer;
vDispatchStr: Pointer;
end; end;
PGuid = ^TGuid; PGuid = ^TGuid;
@ -192,9 +196,6 @@
class function InstanceSize : SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif} class function InstanceSize : SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
class function InheritsFrom(aclass : tclass) : boolean; class function InheritsFrom(aclass : tclass) : boolean;
class function StringMessageTable : pstringmessagetable; class function StringMessageTable : pstringmessagetable;
{ message handling routines }
procedure Dispatch(var message);
procedure DispatchStr(var message);
class function MethodAddress(const name : shortstring) : pointer; class function MethodAddress(const name : shortstring) : pointer;
class function MethodName(address : pointer) : shortstring; class function MethodName(address : pointer) : shortstring;
@ -207,6 +208,10 @@
{ new for gtk, default handler for text based messages } { new for gtk, default handler for text based messages }
procedure DefaultHandlerStr(var message);virtual; procedure DefaultHandlerStr(var message);virtual;
{ message handling routines }
procedure Dispatch(var message);virtual;
procedure DispatchStr(var message);virtual;
{ interface functions } { interface functions }
function GetInterface(const iid : tguid; out obj) : boolean; function GetInterface(const iid : tguid; out obj) : boolean;
function GetInterface(const iidstr : shortstring;out obj) : boolean; function GetInterface(const iidstr : shortstring;out obj) : boolean;