Revision: 13492
http://jvcl.svn.sourceforge.net/jvcl/?rev=13492&view=rev
Author: obones
Date: 2013-01-15 14:55:46 +0000 (Tue, 15 Jan 2013)
Log Message:
-----------
Mantis 6028: Replace #255 by spaces
Modified Paths:
--------------
trunk/jvcl/examples/JvCreateProcess/ConsoleExampleMainFormU.pas
Modified: trunk/jvcl/examples/JvCreateProcess/ConsoleExampleMainFormU.pas
===================================================================
--- trunk/jvcl/examples/JvCreateProcess/ConsoleExampleMainFormU.pas 2013-01-15 14:48:09 UTC (rev 13491)
+++ trunk/jvcl/examples/JvCreateProcess/ConsoleExampleMainFormU.pas 2013-01-15 14:55:46 UTC (rev 13492)
@@ -66,6 +66,7 @@
FCommands: TStringList;
FCurrentCommandIndex: Integer;
function GetCurrentCommand: string;
+ function FormatForDisplay(const S: string): string;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@@ -87,7 +88,7 @@
implementation
uses
- JclSysInfo, JvDSADialogs;
+ JclSysInfo, JclStrings, JvDSADialogs;
{$R *.dfm}
@@ -104,7 +105,7 @@
begin
with lsbConsole do
begin
- Items.Add(S);
+ Items.Add(FormatForDisplay(S));
ItemIndex := Count - 1;
end;
end;
@@ -119,7 +120,7 @@
with lsbConsole do
begin
if Count > 0 then
- Items[Count - 1] := S
+ Items[Count - 1] := FormatForDisplay(S)
else
AddNewLine(S);
ItemIndex := Count - 1;
@@ -192,6 +193,11 @@
end;
end;
+function TConsoleExampleMainForm.FormatForDisplay(const S: string): string;
+begin
+ Result := StrReplaceChar(S, #255, ' ');
+end;
+
procedure TConsoleExampleMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
const
cButtonStrs: array [Boolean] of string = ('Close', 'Cancel');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|