I still use Delphi 5 for some old projects and I try to set the Name of the BugReportFile in the OnShow of the mainform:
MESettings.BugReportFile := 'Cash-IT Beheer-' + DM.KassaNaam + '-' + DM.RegNaam + '-Foutrapport.txt';
MESettings.BugReportZip := 'Cash-IT Beheer-' + DM.KassaNaam + '-' + DM.RegNaam + '-Foutrapport.zip';
MESettings.BugReportSendAs := 'Cash-IT Beheer-' + DM.KassaNaam + '-' + DM.RegNaam + '-Foutrapport.txt';
MESettings.ContinueBtnVisible := False;
MESettings.AutoSave := True;
MESettings.ScreenShotAppOnly := True;
The name is a combination of the program, the name of the PC, the name of the client and '-Foutrapport.txt'.
I try to set it there because in the program initialisation the the name of the PC and the name of the client are not yet available.
When I run the application I get an Access vioaltion in the line: MESettings.BugReportFile := 'Cash-IT Beheer-' + DM.KassaNaam + '-' + DM.RegNaam + '-Foutrapport.txt';
How (and where) should I use MESettings?
Kind regards,
Andre,
The Netherlands
MESettings.BugReportFile
Re: MESettings.BugReportFile
Sorry. my error.
The variable DM.KassaNaam was not yet that set so the error, not the MESettings........
The variable DM.KassaNaam was not yet that set so the error, not the MESettings........
Re: MESettings.BugReportFile
Sorry for the late reply.
So all problems solved?
One small hint: "MESettings" is a function which creates an interface. So calling "MESettings" so often is not optimal for performance. I'd recommend do use "with MESEttings() do begin [...] end" and then change all the settings in the begin..end block. That way the interface only needs to be created once.
So all problems solved?
One small hint: "MESettings" is a function which creates an interface. So calling "MESettings" so often is not optimal for performance. I'd recommend do use "with MESEttings() do begin [...] end" and then change all the settings in the begin..end block. That way the interface only needs to be created once.