I have an application that I create that has a PageControl parameter with several tabs created, on which I put several predefined frames. Each frame called "GetValue" has a subroutine that analyzes the contents of the controls in a string and returns the result. On the main form (RGMain) I have:
Type TGetValueFunction = Function: String; ... Private fGetValueFunction: TGetValueFunction; ... Public Property GetValueFunction: TGetValueFunction Write fGetValueFunction;
In each of the frames, I:
Public Constructor Create(AQwner: TComponent); ... Interface Constructor TBooleanChoiceFrame.Create(AOwner: TComponent); Begin Inherited Create(AOwner); RGMain.GetValueFunction := GetValue; <<<< compile error on this line End;
E2009 Incompatibility types: "regular procedure and method pointer"
Besides fixing the problem, is this even the right way to solve the problem of accessing the GetValue procedure in each frame?
source share