mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 12:25:59 +02:00
* Patch from Mario Ray Mahardika to remove need for TypeCasts (bug ID 30252)
git-svn-id: trunk@35623 -
This commit is contained in:
parent
cd03ec93fe
commit
2469aa48c1
@ -50,13 +50,20 @@ Type
|
|||||||
|
|
||||||
TFPWebActions = Class(TCustomWebActions)
|
TFPWebActions = Class(TCustomWebActions)
|
||||||
private
|
private
|
||||||
FCurrentAction : TCustomWebAction;
|
FCurrentAction : TFPWebAction;
|
||||||
|
function GetFPWebActions(Index : Integer): TFPWebAction;
|
||||||
|
procedure SetFPWebActions(Index : Integer; const AValue: TFPWebAction);
|
||||||
protected
|
protected
|
||||||
Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse; Var Handled : Boolean); virtual;
|
Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse; Var Handled : Boolean); virtual;
|
||||||
Procedure GetContent(ARequest : TRequest; Content : TStream; Var Handled : Boolean); virtual;
|
Procedure GetContent(ARequest : TRequest; Content : TStream; Var Handled : Boolean); virtual;
|
||||||
|
Function GetRequestAction(ARequest: TRequest) : TFPWebAction;
|
||||||
Public
|
Public
|
||||||
|
Function Add : TFPWebAction;
|
||||||
|
Function ActionByName(const AName : String) : TFPWebAction;
|
||||||
|
Function FindAction(const AName : String): TFPWebAction;
|
||||||
|
Property FPWebActions[Index : Integer] : TFPWebAction Read GetFPWebActions Write SetFPWebActions; Default;
|
||||||
Property ActionVar;
|
Property ActionVar;
|
||||||
Property CurrentAction: TCustomWebAction read FCurrentAction;
|
Property CurrentAction: TFPWebAction read FCurrentAction;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TTemplateVar }
|
{ TTemplateVar }
|
||||||
@ -553,10 +560,40 @@ end;
|
|||||||
|
|
||||||
{ TFPWebActions }
|
{ TFPWebActions }
|
||||||
|
|
||||||
|
Function TFPWebActions.GetRequestAction(ARequest: TRequest) : TFPWebAction;
|
||||||
|
begin
|
||||||
|
Result := inherited GetRequestAction(ARequest) as TFPWebAction;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function TFPWebActions.Add : TFPWebAction;
|
||||||
|
begin
|
||||||
|
Result := inherited Add as TFPWebAction;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function TFPWebActions.ActionByName(const AName : String) : TFPWebAction;
|
||||||
|
begin
|
||||||
|
Result := inherited ActionByName(AName) as TFPWebAction;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Function TFPWebActions.FindAction(const AName : String): TFPWebAction;
|
||||||
|
begin
|
||||||
|
Result := inherited FindAction(AName) as TFPWebAction;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TFPWebActions.GetFPWebActions(Index : Integer): TFPWebAction;
|
||||||
|
begin
|
||||||
|
Result := Actions[Index] as TFPWebAction;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFPWebActions.SetFPWebActions(Index : Integer; const AValue: TFPWebAction);
|
||||||
|
begin
|
||||||
|
Actions[Index] := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFPWebActions.HandleRequest(ARequest: TRequest; AResponse: TResponse; Var Handled : Boolean);
|
procedure TFPWebActions.HandleRequest(ARequest: TRequest; AResponse: TResponse; Var Handled : Boolean);
|
||||||
|
|
||||||
Var
|
Var
|
||||||
A : TCustomWebAction;
|
A : TFPWebAction;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef cgidebug}SendMethodEnter('FPWebActions.handlerequest');{$endif cgidebug}
|
{$ifdef cgidebug}SendMethodEnter('FPWebActions.handlerequest');{$endif cgidebug}
|
||||||
|
Loading…
Reference in New Issue
Block a user