mirror of https://gitlab.com/basile.b/dexed.git
refact, omit def member
This commit is contained in:
parent
816c581d7a
commit
767e315164
|
@ -533,8 +533,8 @@ var
|
|||
begin
|
||||
for i:= 0 to sPaths.Count-1 do
|
||||
begin
|
||||
str := sPaths.Strings[i];
|
||||
sPaths.Strings[i] := patchPlateformPath(str);
|
||||
str := sPaths[i];
|
||||
sPaths[i] := patchPlateformPath(str);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -990,7 +990,7 @@ begin
|
|||
try
|
||||
sink.Assign(someFiles);
|
||||
for i := sink.Count-1 downto 0 do
|
||||
if (not sink.Strings[i].fileExists) and (not sink.Strings[i].dirExists) then
|
||||
if (not sink[i].fileExists) and (not sink[i].dirExists) then
|
||||
sink.Delete(i);
|
||||
// folders count
|
||||
cnt := 256;
|
||||
|
@ -1002,25 +1002,25 @@ begin
|
|||
end;
|
||||
for i := sink.Count-1 downto 0 do
|
||||
begin
|
||||
while (countFolder(sink.Strings[i]) <> cnt) do
|
||||
sink.Strings[i] := ExtractFileDir(sink.Strings[i]);
|
||||
while (countFolder(sink[i]) <> cnt) do
|
||||
sink[i] := ExtractFileDir(sink[i]);
|
||||
end;
|
||||
// common folder
|
||||
while(true) do
|
||||
begin
|
||||
for i := sink.Count-1 downto 0 do
|
||||
begin
|
||||
dir := ExtractFileDir(sink.Strings[i]);
|
||||
dir := ExtractFileDir(sink[i]);
|
||||
j := sink.IndexOf(dir);
|
||||
if j = -1 then
|
||||
sink.Strings[i] := dir
|
||||
sink[i] := dir
|
||||
else if j <> i then
|
||||
sink.Delete(i);
|
||||
end;
|
||||
if sink.Count = 1 then
|
||||
break;
|
||||
end;
|
||||
result := sink.Strings[0];
|
||||
result := sink[0];
|
||||
finally
|
||||
sink.free;
|
||||
end;
|
||||
|
@ -1154,7 +1154,7 @@ begin
|
|||
if str = nil then exit;
|
||||
for i:= str.Count-1 downto 0 do
|
||||
// if less than 0 -> not found -> unsigned -> greater than current index.
|
||||
if cardinal(str.IndexOf(str.Strings[i])) < i then
|
||||
if cardinal(str.IndexOf(str[i])) < i then
|
||||
str.Delete(i);
|
||||
{$HINTS ON}
|
||||
end;
|
||||
|
|
|
@ -131,7 +131,7 @@ begin
|
|||
inherited;
|
||||
ctrl := TCEPageControl(owner);
|
||||
i := ctrl.getPageIndex(self);
|
||||
if i <> -1 then ctrl.fTabs.Tabs.Strings[i] := caption;
|
||||
if i <> -1 then ctrl.fTabs.Tabs[i] := caption;
|
||||
end;
|
||||
|
||||
constructor TCEPageControl.Create(aowner: TComponent);
|
||||
|
@ -269,7 +269,7 @@ begin
|
|||
if (index < 0) or (index > fPages.Count-1) then
|
||||
exit;
|
||||
|
||||
pge := TCEPage(fPages.Items[index]);
|
||||
pge := TCEPage(fPages[index]);
|
||||
pge.Visible:=false;
|
||||
end;
|
||||
|
||||
|
@ -281,7 +281,7 @@ begin
|
|||
if (index < 0) or (index > fPages.Count-1) then
|
||||
exit;
|
||||
|
||||
pge := TCEPage(fPages.Items[index]);
|
||||
pge := TCEPage(fPages[index]);
|
||||
if (fSplittedPageIndex = -1) or (index = fSplittedPageIndex) then
|
||||
pge.Align:=alClient;
|
||||
pge.Visible:=true;
|
||||
|
@ -359,7 +359,7 @@ begin
|
|||
else if index < fSplittedPageIndex then
|
||||
fSplittedPageIndex -= 1;
|
||||
|
||||
TCEPage(fPages.Items[index]).Free;
|
||||
TCEPage(fPages[index]).Free;
|
||||
if fPageIndex >= fPages.Count then
|
||||
fPageIndex -= 1;
|
||||
|
||||
|
@ -383,7 +383,7 @@ begin
|
|||
if (fPageIndex < 0) or (fPageIndex > fPages.Count-1) then
|
||||
exit(nil)
|
||||
else
|
||||
exit(TCEPage(fPages.Items[fPageIndex]));
|
||||
exit(TCEPage(fPages[fPageIndex]));
|
||||
end;
|
||||
|
||||
procedure TCEPageControl.setCurrentPage(value: TCEPage);
|
||||
|
@ -398,7 +398,7 @@ end;
|
|||
|
||||
function TCEPageControl.getPage(index: integer): TCEPage;
|
||||
begin
|
||||
exit(TCEPage(fPages.Items[index]));
|
||||
exit(TCEPage(fPages[index]));
|
||||
end;
|
||||
|
||||
function TCEPageControl.getSplitPage: TCEPage;
|
||||
|
|
|
@ -275,7 +275,7 @@ begin
|
|||
updateServerlistening;
|
||||
exit;
|
||||
end;
|
||||
if not (fTempLines.Strings[0] = 'calltips') then exit;
|
||||
if not (fTempLines[0] = 'calltips') then exit;
|
||||
//
|
||||
fTempLines.Delete(0);
|
||||
tips := fTempLines.Text;
|
||||
|
@ -306,12 +306,12 @@ begin
|
|||
updateServerlistening;
|
||||
exit;
|
||||
end;
|
||||
if not (fTempLines.Strings[0] = 'identifiers') then exit;
|
||||
if not (fTempLines[0] = 'identifiers') then exit;
|
||||
//
|
||||
aList.Clear;
|
||||
for i := 1 to fTempLines.Count-1 do
|
||||
begin
|
||||
item := fTempLines.Strings[i];
|
||||
item := fTempLines[i];
|
||||
kind := item[item.length];
|
||||
setLength(item, item.length-2);
|
||||
case kind of
|
||||
|
|
|
@ -208,8 +208,7 @@ begin
|
|||
loader.Position:= 0;
|
||||
//
|
||||
FreeAndNil(fJSON);
|
||||
parser := TJSONParser.Create(loader, true);
|
||||
parser.Options:= parser.Options + [joIgnoreTrailingComma] - [joStrict];
|
||||
parser := TJSONParser.Create(loader, [joIgnoreTrailingComma, joUTF8]);
|
||||
//TODO-cfcl-json: remove etc/fcl-json the day they'll merge and rlz the version with 'Options'
|
||||
//TODO-cfcl-json: track possible changes and fixes at http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-json/
|
||||
try
|
||||
|
@ -268,9 +267,9 @@ begin
|
|||
try
|
||||
str.Add('dub' + exeExt);
|
||||
str.Add('build');
|
||||
str.Add('--build=' + fBuildTypes.Strings[fBuiltTypeIx]);
|
||||
if (fConfigs.Count <> 1) and (fConfigs.Strings[0] <> DubDefaultConfigName) then
|
||||
str.Add('--config=' + fConfigs.Strings[fConfigIx]);
|
||||
str.Add('--build=' + fBuildTypes[fBuiltTypeIx]);
|
||||
if (fConfigs.Count <> 1) and (fConfigs[0] <> DubDefaultConfigName) then
|
||||
str.Add('--config=' + fConfigs[fConfigIx]);
|
||||
str.Add('--compiler=' + DubCompilerFilename);
|
||||
result := str.Text;
|
||||
finally
|
||||
|
@ -302,14 +301,14 @@ end;
|
|||
|
||||
function TCEDubProject.sourceRelative(index: integer): string;
|
||||
begin
|
||||
exit(fSrcs.Strings[index]);
|
||||
exit(fSrcs[index]);
|
||||
end;
|
||||
|
||||
function TCEDubProject.sourceAbsolute(index: integer): string;
|
||||
var
|
||||
fname: string;
|
||||
begin
|
||||
fname := fSrcs.Strings[index];
|
||||
fname := fSrcs[index];
|
||||
if fname.fileExists then
|
||||
result := fname
|
||||
else
|
||||
|
@ -323,7 +322,7 @@ end;
|
|||
|
||||
function TCEDubProject.importPath(index: integer): string;
|
||||
begin
|
||||
result := expandFilenameEx(fBasePath, fImportPaths.Strings[index]);
|
||||
result := expandFilenameEx(fBasePath, fImportPaths[index]);
|
||||
end;
|
||||
{$ENDREGION --------------------------------------------------------------------}
|
||||
|
||||
|
@ -349,8 +348,8 @@ end;
|
|||
|
||||
function TCEDubProject.configurationName(index: integer): string;
|
||||
begin
|
||||
result := fBuildTypes.Strings[index div fConfigs.Count] + ' - ' +
|
||||
fConfigs.Strings[index mod fConfigs.Count];
|
||||
result := fBuildTypes[index div fConfigs.Count] + ' - ' +
|
||||
fConfigs[index mod fConfigs.Count];
|
||||
end;
|
||||
{$ENDREGION --------------------------------------------------------------------}
|
||||
|
||||
|
@ -438,9 +437,9 @@ begin
|
|||
fDubProc.Parameters.Add('run');
|
||||
fDubProc.OnTerminate:= @dubProcOutput;
|
||||
end;
|
||||
fDubProc.Parameters.Add('--build=' + fBuildTypes.Strings[fBuiltTypeIx]);
|
||||
if (fConfigs.Count <> 1) and (fConfigs.Strings[0] <> DubDefaultConfigName) then
|
||||
fDubProc.Parameters.Add('--config=' + fConfigs.Strings[fConfigIx]);
|
||||
fDubProc.Parameters.Add('--build=' + fBuildTypes[fBuiltTypeIx]);
|
||||
if (fConfigs.Count <> 1) and (fConfigs[0] <> DubDefaultConfigName) then
|
||||
fDubProc.Parameters.Add('--config=' + fConfigs[fConfigIx]);
|
||||
fDubProc.Parameters.Add('--compiler=' + DubCompilerFilename);
|
||||
if run and runArgs.isNotEmpty then
|
||||
fDubProc.Parameters.Add('--' + runArgs);
|
||||
|
|
|
@ -446,7 +446,7 @@ begin
|
|||
len := getLineEndingLength(fDoc.fileName);
|
||||
for i := 0 to fDoc.Lines.Count-1 do
|
||||
begin
|
||||
linelen := fDoc.Lines.Strings[i].length;
|
||||
linelen := fDoc.Lines[i].length;
|
||||
if sum + linelen + len > srcpos then
|
||||
begin
|
||||
fDoc.CaretY := i + 1;
|
||||
|
|
|
@ -228,8 +228,8 @@ begin
|
|||
for i:= 0 to ed.Keystrokes.Count-1 do
|
||||
begin
|
||||
shc := TCEPersistentShortcut(fShortCuts.Add);
|
||||
shc.actionName:= EditorCommandToCodeString(ed.Keystrokes.Items[i].Command);
|
||||
shc.shortcut := ed.Keystrokes.Items[i].ShortCut;
|
||||
shc.actionName:= EditorCommandToCodeString(ed.Keystrokes[i].Command);
|
||||
shc.shortcut := ed.Keystrokes[i].ShortCut;
|
||||
end;
|
||||
finally
|
||||
ed.free;
|
||||
|
|
|
@ -335,7 +335,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEMultiDocObserver).docNew(aDoc);
|
||||
(fObservers[i] as ICEMultiDocObserver).docNew(aDoc);
|
||||
end;
|
||||
|
||||
procedure subjDocClosing(aSubject: TCEMultiDocSubject; aDoc: TCESynMemo);
|
||||
|
@ -343,7 +343,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEMultiDocObserver).docClosing(aDoc);
|
||||
(fObservers[i] as ICEMultiDocObserver).docClosing(aDoc);
|
||||
end;
|
||||
|
||||
procedure subjDocFocused(aSubject: TCEMultiDocSubject; aDoc: TCESynMemo);
|
||||
|
@ -351,7 +351,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEMultiDocObserver).docFocused(aDoc);
|
||||
(fObservers[i] as ICEMultiDocObserver).docFocused(aDoc);
|
||||
end;
|
||||
|
||||
procedure subjDocChanged(aSubject: TCEMultiDocSubject; aDoc: TCESynMemo);
|
||||
|
@ -359,7 +359,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEMultiDocObserver).docChanged(aDoc);
|
||||
(fObservers[i] as ICEMultiDocObserver).docChanged(aDoc);
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
||||
|
@ -369,7 +369,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEProjectObserver).ProjNew(aProj);
|
||||
(fObservers[i] as ICEProjectObserver).ProjNew(aProj);
|
||||
end;
|
||||
|
||||
procedure subjProjClosing(aSubject: TCEProjectSubject; aProj: ICECommonProject);
|
||||
|
@ -377,7 +377,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEProjectObserver).projClosing(aProj);
|
||||
(fObservers[i] as ICEProjectObserver).projClosing(aProj);
|
||||
end;
|
||||
|
||||
procedure subjProjFocused(aSubject: TCEProjectSubject; aProj: ICECommonProject);
|
||||
|
@ -385,7 +385,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEProjectObserver).projFocused(aProj);
|
||||
(fObservers[i] as ICEProjectObserver).projFocused(aProj);
|
||||
end;
|
||||
|
||||
procedure subjProjChanged(aSubject: TCEProjectSubject; aProj: ICECommonProject);
|
||||
|
@ -393,7 +393,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEProjectObserver).projChanged(aProj);
|
||||
(fObservers[i] as ICEProjectObserver).projChanged(aProj);
|
||||
end;
|
||||
|
||||
procedure subjProjCompiling(aSubject: TCEProjectSubject; aProj: ICECommonProject);
|
||||
|
@ -401,7 +401,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEProjectObserver).projCompiling(aProj);
|
||||
(fObservers[i] as ICEProjectObserver).projCompiling(aProj);
|
||||
end;
|
||||
|
||||
procedure subjProjCompiled(aSubject: TCEProjectSubject; aProj: ICECommonProject; success: boolean);
|
||||
|
@ -409,7 +409,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
with aSubject do for i:= 0 to fObservers.Count-1 do
|
||||
(fObservers.Items[i] as ICEProjectObserver).projCompiled(aProj, success);
|
||||
(fObservers[i] as ICEProjectObserver).projCompiled(aProj, success);
|
||||
end;
|
||||
|
||||
{$ENDREGION}
|
||||
|
|
|
@ -186,9 +186,9 @@ begin
|
|||
listFiles(lst, dir);
|
||||
for j:= 0 to lst.Count-1 do
|
||||
begin
|
||||
if lst.Strings[j].extractFileExt = libExt then
|
||||
if aList.IndexOf(lst.Strings[j]) = -1 then
|
||||
aList.Add(lst.Strings[j]);
|
||||
if lst[j].extractFileExt = libExt then
|
||||
if aList.IndexOf(lst[j]) = -1 then
|
||||
aList.Add(lst[j]);
|
||||
end;
|
||||
finally
|
||||
lst.Free;
|
||||
|
|
|
@ -275,7 +275,7 @@ begin
|
|||
Caption := nme;
|
||||
SubItems.Add(prj.outputFilename);
|
||||
if str.Count = 1 then
|
||||
cdy := ExtractFileDir(str.Strings[0])
|
||||
cdy := ExtractFileDir(str[0])
|
||||
else begin
|
||||
cdy := commonFolder(str);
|
||||
cdy := ExtractFileDir(cdy);
|
||||
|
@ -367,7 +367,7 @@ begin
|
|||
str.Add(fProj.sourceAbsolute(i));
|
||||
// single source libs usually have the structure "src/<fname>"
|
||||
if str.Count = 1 then
|
||||
root := ExtractFileDir(str.Strings[0])
|
||||
root := ExtractFileDir(str[0])
|
||||
// multi source libs have the structure "src/LibName/<fname>"/...
|
||||
else begin
|
||||
root := commonFolder(str);
|
||||
|
@ -558,9 +558,9 @@ begin
|
|||
begin
|
||||
itm := TLibraryItem(LibMan.libraries.Add);
|
||||
itm.libAlias := row.Caption;
|
||||
itm.libFile := row.SubItems.Strings[0];
|
||||
itm.libSourcePath := row.SubItems.Strings[1];
|
||||
itm.projectFile:= row.SubItems.Strings[2];
|
||||
itm.libFile := row.SubItems[0];
|
||||
itm.libSourcePath := row.SubItems[1];
|
||||
itm.projectFile:= row.SubItems[2];
|
||||
end;
|
||||
LibMan.libraries.EndUpdate;
|
||||
LibMan.updateDCD;
|
||||
|
|
|
@ -622,7 +622,7 @@ begin
|
|||
//
|
||||
for i := 0 to fDocuments.Count-1 do
|
||||
begin
|
||||
str := fDocuments.Strings[i];
|
||||
str := fDocuments[i];
|
||||
if str.fileExists then
|
||||
begin
|
||||
docHandler.openDocument(str);
|
||||
|
@ -1298,7 +1298,7 @@ begin
|
|||
|
||||
for i:= 0 to srcLst.Count-1 do
|
||||
begin
|
||||
fname := srcLst.Strings[i];
|
||||
fname := srcLst[i];
|
||||
itm := TMenuItem.Create(trgMnu);
|
||||
itm.Hint := fname;
|
||||
itm.Caption := shortenPath(fname, 50);
|
||||
|
@ -1846,7 +1846,7 @@ begin
|
|||
fRunnableSw := '';
|
||||
for i := memo.Lines.Count-1 downto 0 do
|
||||
begin
|
||||
cur := memo.Lines.Strings[i];
|
||||
cur := memo.Lines[i];
|
||||
// duplicated item
|
||||
j := memo.Lines.IndexOf(cur);
|
||||
if (j > -1) and (j < i) then
|
||||
|
@ -2157,7 +2157,7 @@ begin
|
|||
for i := 0 to lst.Count-1 do
|
||||
begin
|
||||
itm := TMenuItem.Create(self);
|
||||
itm.Caption := lst.Strings[i].extractFileName;
|
||||
itm.Caption := lst[i].extractFileName;
|
||||
itm.Caption := stripFileExt(itm.Caption);
|
||||
itm.OnClick := @layoutMnuItemClick;
|
||||
itm.ImageIndex := 32;
|
||||
|
|
|
@ -800,7 +800,7 @@ begin
|
|||
fDemangler.Execute;
|
||||
for i := 0 to fToDemangle.Count-1 do
|
||||
begin
|
||||
str := fToDemangle.Strings[i] + LineEnding;
|
||||
str := fToDemangle[i] + LineEnding;
|
||||
fDemangler.Input.Write(str[1], str.length);
|
||||
end;
|
||||
fDemangler.CloseInput;
|
||||
|
@ -817,7 +817,7 @@ begin
|
|||
begin
|
||||
itm := TTreeNode(fToDemangleObjs.Items[i]);
|
||||
if itm.isNil then continue;
|
||||
itm.Text := fToDemangle.Strings[i];
|
||||
itm.Text := fToDemangle[i];
|
||||
end;
|
||||
freeDemangler;
|
||||
end;
|
||||
|
|
|
@ -404,8 +404,8 @@ begin
|
|||
// prepares the exclusions
|
||||
for i := 0 to currentConfiguration.pathsOptions.exclusions.Count-1 do
|
||||
begin
|
||||
str := symbolExpander.get(currentConfiguration.pathsOptions.exclusions.Strings[i]);
|
||||
rel := expandFilenameEx(fBasePath, currentConfiguration.pathsOptions.exclusions.Strings[i]);
|
||||
str := symbolExpander.get(currentConfiguration.pathsOptions.exclusions[i]);
|
||||
rel := expandFilenameEx(fBasePath, currentConfiguration.pathsOptions.exclusions[i]);
|
||||
if str.fileExists then
|
||||
ex_files.Add(str)
|
||||
else if str.dirExists then
|
||||
|
@ -425,7 +425,7 @@ begin
|
|||
end;
|
||||
// libraries: an asterisk in list selects all the entries
|
||||
libAliasesPtr := fLibAliases;
|
||||
if (fLibAliases.Count > 0) and (fLibAliases.Strings[0] = '*') then
|
||||
if (fLibAliases.Count > 0) and (fLibAliases[0] = '*') then
|
||||
libAliasesPtr := nil;
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
|
@ -496,7 +496,7 @@ var
|
|||
'Do you wish to select the new root folder ?') <> mrOk then exit;
|
||||
// TODO-cimprovement: use commonFolder() when it'll be compat. with the rel. paths.
|
||||
// hint for the common dir
|
||||
dirHint := fSrcs.Strings[i];
|
||||
dirHint := fSrcs[i];
|
||||
while (dirHint[1] = '.') or (dirHint[1] = DirectorySeparator) do
|
||||
dirHint := dirHint[2..dirHint.length];
|
||||
ini := fFilename.extractFilePath;
|
||||
|
@ -504,11 +504,11 @@ var
|
|||
exit;
|
||||
for i := 0 to fSrcs.Count-1 do
|
||||
begin
|
||||
src := fSrcs.Strings[i];
|
||||
src := fSrcs[i];
|
||||
while (src[1] = '.') or (src[1] = DirectorySeparator) do
|
||||
src := src[2..src.length];
|
||||
if fileExists(expandFilenameEx(fBasePath, newdir + DirectorySeparator + src)) then
|
||||
fSrcs.Strings[i] := ExtractRelativepath(fBasePath, newdir + DirectorySeparator + src);
|
||||
fSrcs[i] := ExtractRelativepath(fBasePath, newdir + DirectorySeparator + src);
|
||||
hasPatched := true;
|
||||
end;
|
||||
end;
|
||||
|
@ -631,7 +631,7 @@ begin
|
|||
else if Sources.Count > 0 then
|
||||
begin
|
||||
// ideally, main() should be searched for, when project binaryKind is executable
|
||||
fOutputFilename := Sources.Strings[0].extractFileName;
|
||||
fOutputFilename := Sources[0].extractFileName;
|
||||
fOutputFilename := stripFileExt(fOutputFilename);
|
||||
if fileName.fileExists then
|
||||
fOutputFilename := fileName.extractFilePath + fOutputFilename
|
||||
|
@ -662,12 +662,12 @@ begin
|
|||
//
|
||||
for i := 0 to processInfo.simpleCommands.Count-1 do
|
||||
begin
|
||||
pname := symbolExpander.get(processInfo.simpleCommands.Strings[i]);
|
||||
pname := symbolExpander.get(processInfo.simpleCommands[i]);
|
||||
proc := TProcess.Create(nil);
|
||||
lst := TStringList.Create;
|
||||
try
|
||||
CommandToList(pname, lst);
|
||||
proc.Executable := lst.Strings[0];
|
||||
proc.Executable := lst[0];
|
||||
proc.Options:= [poUsePipes, poStderrToOutPut];
|
||||
lst.Delete(0);
|
||||
proc.Parameters.Assign(lst);
|
||||
|
@ -676,7 +676,7 @@ begin
|
|||
lst.Clear;
|
||||
ce_common.processOutputToStrings(proc, lst);
|
||||
for j := 0 to lst.Count -1 do
|
||||
getMessageDisplay.message(lst.Strings[j], self as ICECommonProject, amcProj, amkAuto);
|
||||
getMessageDisplay.message(lst[j], self as ICECommonProject, amcProj, amkAuto);
|
||||
finally
|
||||
proc.Free;
|
||||
lst.Free;
|
||||
|
@ -697,7 +697,7 @@ begin
|
|||
proc.Executable := exeFullName(pname);
|
||||
j := proc.Parameters.Count-1;
|
||||
for i:= 0 to j do
|
||||
proc.Parameters.AddText(symbolExpander.get(proc.Parameters.Strings[i]));
|
||||
proc.Parameters.AddText(symbolExpander.get(proc.Parameters[i]));
|
||||
for i:= 0 to j do
|
||||
proc.Parameters.Delete(0);
|
||||
if proc.CurrentDirectory.isNotEmpty then
|
||||
|
@ -980,14 +980,14 @@ end;
|
|||
|
||||
function TCENativeProject.sourceRelative(index: integer): string;
|
||||
begin
|
||||
exit(fSrcs.Strings[index]);
|
||||
exit(fSrcs[index]);
|
||||
end;
|
||||
|
||||
function TCENativeProject.sourceAbsolute(index: integer): string;
|
||||
var
|
||||
fname: string;
|
||||
begin
|
||||
fname := fSrcs.Strings[index];
|
||||
fname := fSrcs[index];
|
||||
if fname.fileExists then
|
||||
result := fname
|
||||
else
|
||||
|
@ -1001,7 +1001,7 @@ end;
|
|||
|
||||
function TCENativeProject.importPath(index: integer): string;
|
||||
begin
|
||||
result := currentConfiguration.pathsOptions.importModulePaths.Strings[index];
|
||||
result := currentConfiguration.pathsOptions.importModulePaths[index];
|
||||
if fBasePath.dirExists then
|
||||
result := expandFilenameEx(fBasePath, result);
|
||||
end;
|
||||
|
|
|
@ -138,12 +138,12 @@ begin
|
|||
VK_UP: begin
|
||||
fMruPos += 1;
|
||||
if fMruPos > fMru.Count-1 then fMruPos := 0;
|
||||
txtInp.Text := fMru.Strings[fMruPos];
|
||||
txtInp.Text := fMru[fMruPos];
|
||||
end;
|
||||
VK_DOWN: begin
|
||||
fMruPos -= 1;
|
||||
if fMruPos < 0 then fMruPos := fMru.Count-1;
|
||||
txtInp.Text := fMru.Strings[fMruPos];
|
||||
txtInp.Text := fMru[fMruPos];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
@ -187,7 +187,7 @@ var
|
|||
begin
|
||||
i := fSynchroItem.IndexOf(Item);
|
||||
if i = -1 then exit('');
|
||||
result := fSynchroValue.Strings[i];
|
||||
result := fSynchroValue[i];
|
||||
end;
|
||||
|
||||
procedure TCEProjectConfigurationWidget.syncroGetPropAsString(const ASection, Item, Value: string);
|
||||
|
|
|
@ -287,7 +287,7 @@ begin
|
|||
listFiles(lst, dir, true);
|
||||
for i := 0 to lst.Count-1 do
|
||||
begin
|
||||
fname := lst.Strings[i];
|
||||
fname := lst[i];
|
||||
if isDlangCompilable(fname.extractFileExt) then
|
||||
fProject.addSource(fname);
|
||||
end;
|
||||
|
|
|
@ -353,7 +353,7 @@ begin
|
|||
fmt := fileName + '(%d,%d): "%s"';
|
||||
for i := 0 to high(res) do
|
||||
begin
|
||||
msg := format(fmt, [res[i].Y, res[i].X, Trim(lines.Strings[res[i].Y-1])]);
|
||||
msg := format(fmt, [res[i].Y, res[i].X, Trim(lines[res[i].Y-1])]);
|
||||
msgs.message(msg, nil, amcMisc, amkInf);
|
||||
end;
|
||||
finally
|
||||
|
|
|
@ -353,7 +353,7 @@ var
|
|||
begin
|
||||
for i := fMacros.Count-1 downto 0 do
|
||||
begin
|
||||
text := fMacros.Strings[i];
|
||||
text := fMacros[i];
|
||||
if text.length >= 4 then
|
||||
if text[1] = '$' then
|
||||
if Pos('=', text) > 2 then
|
||||
|
|
|
@ -203,7 +203,7 @@ begin
|
|||
end;
|
||||
fSymbols[CPFS] := str.Text;
|
||||
if str.Count = 1 then
|
||||
fSymbols[CPCD] := ExtractFileDir(Str.Strings[0])
|
||||
fSymbols[CPCD] := ExtractFileDir(str[0])
|
||||
else
|
||||
fSymbols[CPCD] := commonFolder(str);
|
||||
finally
|
||||
|
@ -264,9 +264,9 @@ begin
|
|||
for i := 0 to elems.Count - 1 do
|
||||
begin
|
||||
if elems.Objects[i].isNil then
|
||||
Result += elems.Strings[i]
|
||||
Result += elems[i]
|
||||
else
|
||||
case elems.Strings[i] of
|
||||
case elems[i] of
|
||||
'<', '>': continue;
|
||||
'CAF', 'CoeditApplicationFile': Result += fSymbols[CAF];
|
||||
'CAP', 'CoeditApplicationPath': Result += fSymbols[CAP];
|
||||
|
|
|
@ -1167,8 +1167,8 @@ begin
|
|||
if fFileDate = newDate then exit;
|
||||
if fFileDate <> 0.0 then
|
||||
begin
|
||||
// note: this could cause a bug in France during the switch from winter time to summer time.
|
||||
// e.g: save at 2h59, at 3h00, clock is reset to 2h00, set the focus on the doc: new version message.
|
||||
// note: this could cause a bug during the DST switch.
|
||||
// e.g: save at 2h59, at 3h00 clock is reset to 2h00, set the focus on the doc: new version message.
|
||||
if dlgOkCancel(format('"%s" has been modified by another program, load the new version ?',
|
||||
[shortenPath(fFilename, 25)])) = mrOk then
|
||||
begin
|
||||
|
@ -1194,7 +1194,7 @@ var
|
|||
begin
|
||||
result := 0;
|
||||
if fMousePos.y-1 > Lines.Count-1 then exit;
|
||||
llen := Lines.Strings[fMousePos.y-1].length;
|
||||
llen := Lines[fMousePos.y-1].length;
|
||||
if fMousePos.X > llen then exit;
|
||||
//
|
||||
// something note really clear:
|
||||
|
@ -1202,7 +1202,7 @@ begin
|
|||
// TCESynMemo.getMouseFileBytePos works when using the line ending from the system.
|
||||
len := getSysLineEndLen;
|
||||
for i:= 0 to fMousePos.y-2 do
|
||||
result += Lines.Strings[i].length + len;
|
||||
result += Lines[i].length + len;
|
||||
result += fMousePos.x;
|
||||
end;
|
||||
{$ENDREGION --------------------------------------------------------------------}
|
||||
|
|
|
@ -586,9 +586,9 @@ begin
|
|||
begin
|
||||
col -= 1;
|
||||
if col < item1.SubItems.Count then
|
||||
txt1 := item1.SubItems.Strings[col];
|
||||
txt1 := item1.SubItems[col];
|
||||
if col < item2.SubItems.Count then
|
||||
txt2 := item2.SubItems.Strings[col];
|
||||
txt2 := item2.SubItems[col];
|
||||
end;
|
||||
Compare := AnsiCompareStr(txt1, txt2);
|
||||
if lstItems.SortDirection = sdDescending then
|
||||
|
|
|
@ -83,7 +83,7 @@ var
|
|||
i: Integer;
|
||||
begin
|
||||
for i := 0 to CustomTools.tools.Count-1 do
|
||||
lstTools.Items.Strings[i] := CustomTools[i].toolAlias;
|
||||
lstTools.Items[i] := CustomTools[i].toolAlias;
|
||||
end;
|
||||
|
||||
procedure TCEToolsEditorWidget.lstToolsSelectionChange(Sender: TObject;
|
||||
|
|
Loading…
Reference in New Issue