diff --git a/.gitattributes b/.gitattributes index b13be104f1..308fbab81a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6274,6 +6274,7 @@ tests/webtbs/tw3971.pp svneol=native#text/plain tests/webtbs/tw3973.pp svneol=native#text/plain tests/webtbs/tw3977.pp svneol=native#text/plain tests/webtbs/tw3977.txt svneol=native#text/plain +tests/webtbs/tw3997.pp -text svneol=unset#text/plain tests/webtbs/tw4006.pp svneol=native#text/plain tests/webtbs/tw4007.pp svneol=native#text/plain tests/webtbs/tw4009.pp svneol=native#text/plain diff --git a/tests/webtbs/tw3997.pp b/tests/webtbs/tw3997.pp new file mode 100644 index 0000000000..a2de5f9586 --- /dev/null +++ b/tests/webtbs/tw3997.pp @@ -0,0 +1,75 @@ +{ Source provided for Free Pascal Bug Report 3997 } +{ Submitted by "Dominique Louis" on 2005-05-21 } +{ e-mail: Dominique@SavageSoftware.com.au } + +{$mode delphi} +program Project1; + +{$APPTYPE CONSOLE} + +uses + SysUtils; + +type + TMyNotifyEvent = procedure of object; + + TMyBaseWindow = class( TObject ) + private + FOnRender: TMyNotifyEvent; + public + property OnRender: TMyNotifyEvent read FOnRender write FOnRender; + end; + + TBaseInterface = class( TObject ) + protected + procedure Render; virtual; abstract; + public + MainWindow : TMyBaseWindow; + constructor Create; + destructor Destroy; override; + procedure ResetInputManager; + end; + + TMyInterface = class( TBaseInterface ) + protected + procedure Render; override; + end; + + +{ TBaseInterface } +constructor TBaseInterface.Create; +begin + inherited; + WriteLn( 'TBaseInterface.Create' ); + MainWindow := TMyBaseWindow.Create; + ResetInputManager; +end; + +destructor TBaseInterface.Destroy; +begin + MainWindow.Free; + inherited; +end; + +procedure TBaseInterface.ResetInputManager; +begin + WriteLn( 'ResetInputManager' ); + MainWindow.OnRender := Render; +end; + +{ TMyInterface } +procedure TMyInterface.Render; +begin + WriteLn( 'Rendering' ); +end; + +var + MyInterface : TMyInterface; + +begin + MyInterface := TMyInterface.Create; + + MyInterface.Render; + + MyInterface.Free; +end. \ No newline at end of file