MG: fixed codetools abort

git-svn-id: trunk@3612 -
This commit is contained in:
lazarus 2002-11-06 15:59:24 +00:00
parent d4b3937a3a
commit fb4ff8c25c
2 changed files with 21 additions and 13 deletions

View File

@ -337,10 +337,6 @@ var CodeToolBoss: TCodeToolManager;
implementation
type
ECodeToolAbort = Exception;
function CompareCodeToolMainSources(Data1, Data2: Pointer): integer;
var
Src1, Src2: integer;
@ -598,10 +594,6 @@ begin
fErrorCode:=ErrorSrcTool.ErrorPosition.Code;
fErrorColumn:=ErrorSrcTool.ErrorPosition.X;
fErrorLine:=ErrorSrcTool.ErrorPosition.Y;
end else if (AnException is ECodeToolAbort) then begin
// abort
FErrorMsg:='Abort';
fErrorCode:=nil;
end else begin
// unknown exception
FErrorMsg:=AnException.ClassName+': '+FErrorMsg;
@ -1549,7 +1541,7 @@ end;
function TCodeToolManager.OnParserProgress(Tool: TCustomCodeTool): boolean;
begin
Result:=false;
Result:=true;
if not FAbortable then exit;
if not Assigned(OnCheckAbort) then exit;
Result:=not OnCheckAbort();
@ -1557,7 +1549,7 @@ end;
function TCodeToolManager.OnScannerProgress(Sender: TLinkScanner): boolean;
begin
Result:=false;
Result:=true;
if not FAbortable then exit;
if not Assigned(OnCheckAbort) then exit;
Result:=not OnCheckAbort();

View File

@ -225,14 +225,16 @@ type
TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;
TCloseQueryEvent = procedure(Sender : TObject; var CanClose : boolean) of object;
TFormStateType = (
fsCreating,
fsVisible,
fsCreating, // initializing (form streaming)
fsVisible, // form should be shown
fsShowing,
fsModal,
fsModal, // form is modal
fsCreatedMDIChild
);
TFormState = set of TFormStateType;
TModalResult = low(Integer)..high(Integer);
TCustomForm = class(TScrollingWinControl)
@ -478,6 +480,20 @@ type
HintData: Pointer;
end;
TCMHintShow = record
Msg: Cardinal;
Reserved: Integer;
HintInfo: PHintInfo;
Result: Integer;
end;
TCMHintShowPause = record
Msg: Cardinal;
WasActive: Integer;
Pause: PInteger;
Result: Integer;
end;
TAppHintTimerType = (ahtNone, ahtShowHint, ahtHideHint, ahtReshowHint);
TShowHintEvent = procedure (var HintStr: string; var CanShow: Boolean;