Use helper methods where possible, and leave GUI stuff in form units.

This commit is contained in:
Ansgar Becker
2009-04-28 22:35:00 +00:00
parent 8610147eaa
commit eadeed1ae2
5 changed files with 12 additions and 15 deletions

View File

@ -189,7 +189,6 @@ type
function CompareNumbers(List: TStringList; Index1, Index2: Integer): Integer;
function ListIndexByRegExpr(List: TWideStrings; Expression: WideString): Integer;
procedure RestoreSyneditStyles(Highlighter: TSynCustomHighlighter);
procedure CheckAndWarnIfNulChar(var Text: WideString);
var
MYSQL_KEYWORDS : TStringList;
MainReg : TRegistry;
@ -2973,16 +2972,6 @@ begin
end;
procedure CheckAndWarnIfNulChar(var Text: WideString);
begin
// Used by grid cell editors which use some TCustomEdit descendent which all cut a text at a NUL char
if Pos(#0, Text) > 0 then begin
MessageDlg('Text contains at least one NUL (\0) char. To avoid cutting off the rest they were just removed.', mtWarning, [mbOK], 0);
Text := WideStringReplace(Text, #0, '', [rfReplaceAll]);
end;
end;
initialization