Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Type
TFunctionInfo = Class(TObject)
fFunctionName: String;
slPreviousFuncs: TStringList; //stack to keep previous function names in
//...any other info you want to keep track of
private
function Get_FunctionName: String;
function Set_FunctionName(value: String): String;
published
Constructor Create;
Destructor Destroy;
public
function ResetFunctionName: String;
function GetFunctionStack: String;
property FunctionName: String read Get_FunctionName write Set_FunctionName;
end;
Implementation
constructor TFunctionInfo.Create;
begin
inherited;
fFunctionName := '';
slPreviousFuncs := TStringList.Create;
end;
destructor TFunctionInfo.Destroy;
begin
//do any clean up you need to do...
FreeAndNil(slPreviousFuncs);
inherited;
end;
function TFunctionInfo.Get_FunctionName: String;
begin
//do anything else you need to do
result := fFunctionName;
end;
function TFunctionInfo.Set_FunctionName(value: String);
begin
slPreviousFuncs.Add(fFunctionName); //save the old one
fFunctionName := value;
end;
function TFunctionInfo.ResetFunctionName: String;
begin
fFunctionName := slPreviousFuncs[slPreviousFuncs.Count - 1]; //get the previous function name
slPreviousFuncs.Delete(slPreviousFuncs.Count - 1); //Delete what we just reset to.
end;
funcion TFunctionInfo.GetFunctionStack: String;
begin
result := slPreviousFuncs.CommaText;
//return a comma-delimited string of the previous function names.
end;