PDA

View Full Version : Re: Install/Activate EurekaLog Via A Procedure


admin
02-Oct-2005, 08:50 AM
ehartner wrote:
> In Delphi 7, instead of Eurekalog being installed and activated via the
> project files, is it possible to install it via a procedure. This way,
> we could call the install/activate procedure from the main form. This
> makes it much easier to standardize on all of the settings ... and
> makes it easier if we want to globally change the standards.
>
> I just think that this procedural approch give us much more
> flexibility.
>
> Thanks,
> Eric Hartner

You can compile your application with EurekaLog active, and after
disable it in the project source file (.DPR) after the begin, using the
SetEurekaLogState procedure.
After you can reactivate EurekaLog in every project point use always the
same procedure, changing its settings using the CurrentEurekaLogOptions
function.

See the following examples...


Example (How disable EurekaLog at run-time):


program Project1;

uses
ExceptionLog,
Forms,
Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin

HERE --> SetEurekaLogState(False); // Disable EurekaLog at run-time!

Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.


Example (How change EurekaLog settings at run-time):

uses
ExceptionLog;

begin
...
CurrentEurekaLogOptions.YOUR_OPTION := VALUE; // See the manual
"CurrentEurekaLogOptions" topic for further details about this function.
...
end;


PS: I hope to have answered to your question, otherwise don't hesitate
to recontact to me, ok? :)

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.