mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:29:25 +02:00
* initial version
git-svn-id: trunk@1537 -
This commit is contained in:
parent
ad0a5ace4f
commit
43a60ccfe2
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
75
tests/webtbs/tw3997.pp
Normal file
75
tests/webtbs/tw3997.pp
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user