[lazarus] Win32 Installer/Lazarus

Cliff Baeseman vbman at pcpros.net
Sun Jul 18 15:21:26 EDT 1999


Thanx I will look at implementing that I am having a hell of a fight with
resize and stuff at the moment. I checked out the cvs source code and lost
the menus. Now when I do a resize I get blow out of the water not cool.

Cliff
-----Original Message-----
From: Michael A. Hess <mhess at miraclec.com>
To: lazarus at miraclec.com <lazarus at miraclec.com>
Date: Sunday, July 18, 1999 2:19 PM
Subject: Re: [lazarus] Win32 Installer/Lazarus


>michael at tfdec1.fys.kuleuven.ac.be wrote:
>>
>> Why don't you use Michael Hess' debug object he posted some time ago ?
>> With minimal effort , the debug can be sent to a window with a tmemo
>> in it if required.
>
>Here is the post again so you don't have to go look for it. As stated it
>is simple to use. Cliff either you or I can commit this to CVS. Take
>your pick.
>
>When we use it we just need to add the udebug unit to the lazarus.pp
>code and in that unit we can then turn on or turn off ALL debugging for
>all of the files. As MVC suggested we can then expand on this to have it
>add output to a window in the IDE.
>
>
>Here it is. It is plainfully simple. Just use it as follows. Place it in
>the uses clause in the unit where you want to use it.
>
>   uses udebug;
>
>Then someplace in the unit just turn on debug output with.
>
>   Debug.DebugOn := True;
>
>Now any place you have the text
>
>   Debug.Write('my message');
>
>you will get that output. As I stated if you want it to go to a log file
>then add
>
>   Debug.LogFile := 'mylogfile.log';
>
>The rest takes care of itself.
>
>+++++++++++++++++++++++++++++++++++++++++++++
>unit udebug;
>
>{$mode delphi}
>
>interface
>
>uses sysutils;
>
>type
>   TDebug = class
>   private
>      { Private declarations }
>      fLogFileName : string;
>      fState : Boolean;
>
>   public
>      { Public declarations }
>      constructor Create;
>      procedure Write(message : string);
>
>      property LogFile : String read fLogFileName write fLogFileName;
>      property DebugOn : Boolean read fState write fState;
>
>   end;
>
>var
>   Debug : TDebug;
>
>implementation
>
>constructor TDebug.Create;
>begin
>   fLogFileName := '';
>   fState := False;   { False is off - True is on }
>end;
>
>procedure TDebug.Write(message : string);
>var
>   fileH  : Text;
>begin
>   if fState then
>   begin
>      Assign(fileH, fLogFileName);
>      {$I-}
>      if fLogFileName <> '' then
>         if FileExists(fLogFileName) = False then
>         begin
>            Rewrite(fileH);
>            Close(fileH);
>         end;
>      Append(fileH);
>      if ioresult = 0 then
>         Writeln(fileH, message);
>      {$I+}
>      Close(fileH);
>   end;
>end;
>
>initialization
>
>   Debug := TDebug.Create;
>
>finalization
>
>   Debug.Free;
>
>end.
>
>--
>==== Programming my first best destiny! ====
>
>Michael A. Hess      Miracle Concepts, Inc.
>mhess at miraclec.com   http://www.miraclec.com
>
>_________________________________________________________________
>     To unsubscribe: mail lazarus-request at miraclec.com with
>                "unsubscribe" as the Subject
>    archives at http://www.miraclec.com/list_archives/lazarus
>






More information about the Lazarus mailing list