作成しているアプリケーションがあります。このアプリケーションには、いくつかの事前定義されたフレームを配置する、いくつかの作成されたTabSheetsを含むPageControlがあります。各フレームには、コントロールの内容を文字列に解析して結果を返す「GetValue」というルーチンがあります。メインフォーム(RGMain)には次のものがあります。
Type
TGetValueFunction = Function: String;
...
Private
fGetValueFunction: TGetValueFunction;
...
Public
Property GetValueFunction: TGetValueFunction Write fGetValueFunction;
私が持っている各フレームには:
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非互換タイプ:'通常のプロシージャとメソッドポインタ'
問題を修正するだけでなく、これは各フレームでGetValueルーチンにアクセスする問題を解決する正しい方法でもありますか?