mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-04 23:15:59 +02:00
lcl: change OnExceptionCircle to OnCircularException, remove handler list.
git-svn-id: trunk@52730 -
This commit is contained in:
parent
ccdd31bd57
commit
6f5fa419e8
@ -5841,8 +5841,6 @@
|
|||||||
<notes><note>?</note><note>application/taskbar window?</note><note>purpose?</note><note>what's the purpose for *not* returning MainForm.Handle???</note>
|
<notes><note>?</note><note>application/taskbar window?</note><note>purpose?</note><note>what's the purpose for *not* returning MainForm.Handle???</note>
|
||||||
</notes>
|
</notes>
|
||||||
</element>
|
</element>
|
||||||
<element name="TApplicationHandlerType.ahtExceptionCircle"><short>Handler invoked when there is an exception circle before killing the app with Halt</short>
|
|
||||||
</element>
|
|
||||||
<!-- pointer type Visibility: default -->
|
<!-- pointer type Visibility: default -->
|
||||||
<element name="PAsyncCallQueueItem" link="TAsyncCallQueueItem">
|
<element name="PAsyncCallQueueItem" link="TAsyncCallQueueItem">
|
||||||
<short>A queued asynchronous callback request node.</short>
|
<short>A queued asynchronous callback request node.</short>
|
||||||
@ -9319,13 +9317,7 @@ Before 0.9.31 there was no exception. Therefore some resourceless forms might us
|
|||||||
<errors/>
|
<errors/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
<element name="TApplication.OnExceptionCircle"><short>Handler invoked when there is an exception circle before killing the app with Halt</short>
|
<element name="TApplication.OnCircularException"><short>Handler invoked when there is an exception circle before killing the app with Halt</short>
|
||||||
</element>
|
|
||||||
<element name="TApplication.AddOnExceptionCircleHandler"><short>Adds an application exception circle handler.</short><seealso><link id="TApplicationHandlerType.ahtExceptionCircle"/>
|
|
||||||
</seealso>
|
|
||||||
</element>
|
|
||||||
<element name="TApplication.RemoveOnExceptionCircleHandler"><short>Removes an application exception circle handler.</short><seealso><link id="TApplicationHandlerType.ahtExceptionCircle"/>
|
|
||||||
</seealso>
|
|
||||||
</element>
|
</element>
|
||||||
</module>
|
</module>
|
||||||
<!-- Forms -->
|
<!-- Forms -->
|
||||||
|
@ -1218,8 +1218,7 @@ type
|
|||||||
ahtHelp,
|
ahtHelp,
|
||||||
ahtHint,
|
ahtHint,
|
||||||
ahtShowHint,
|
ahtShowHint,
|
||||||
ahtGetMainFormHandle,
|
ahtGetMainFormHandle
|
||||||
ahtExceptionCircle
|
|
||||||
);
|
);
|
||||||
|
|
||||||
PAsyncCallQueueItem = ^TAsyncCallQueueItem;
|
PAsyncCallQueueItem = ^TAsyncCallQueueItem;
|
||||||
@ -1301,7 +1300,7 @@ type
|
|||||||
FMainFormOnTaskBar: Boolean;
|
FMainFormOnTaskBar: Boolean;
|
||||||
FModalLevel: Integer;
|
FModalLevel: Integer;
|
||||||
FMoveFormFocusToChildren: Boolean;
|
FMoveFormFocusToChildren: Boolean;
|
||||||
FOnExceptionCircle: TExceptionEvent;
|
FOnCircularException: TExceptionEvent;
|
||||||
FOnGetMainFormHandle: TGetHandleEvent;
|
FOnGetMainFormHandle: TGetHandleEvent;
|
||||||
FOnMessageDialogFinished: TModalDialogFinished;
|
FOnMessageDialogFinished: TModalDialogFinished;
|
||||||
FOnModalBegin: TNotifyEvent;
|
FOnModalBegin: TNotifyEvent;
|
||||||
@ -1468,8 +1467,6 @@ type
|
|||||||
procedure RemoveOnDeactivateHandler(Handler: TNotifyEvent);
|
procedure RemoveOnDeactivateHandler(Handler: TNotifyEvent);
|
||||||
procedure AddOnExceptionHandler(Handler: TExceptionEvent; AsFirst: Boolean=true);
|
procedure AddOnExceptionHandler(Handler: TExceptionEvent; AsFirst: Boolean=true);
|
||||||
procedure RemoveOnExceptionHandler(Handler: TExceptionEvent);
|
procedure RemoveOnExceptionHandler(Handler: TExceptionEvent);
|
||||||
procedure AddOnExceptionCircleHandler(Handler: TExceptionEvent; AsFirst: Boolean=true);
|
|
||||||
procedure RemoveOnExceptionCircleHandler(Handler: TExceptionEvent);
|
|
||||||
procedure AddOnEndSessionHandler(Handler: TNotifyEvent; AsFirst: Boolean=true);
|
procedure AddOnEndSessionHandler(Handler: TNotifyEvent; AsFirst: Boolean=true);
|
||||||
procedure RemoveOnEndSessionHandler(Handler: TNotifyEvent);
|
procedure RemoveOnEndSessionHandler(Handler: TNotifyEvent);
|
||||||
procedure AddOnQueryEndSessionHandler(Handler: TQueryEndSessionEvent; AsFirst: Boolean=true);
|
procedure AddOnQueryEndSessionHandler(Handler: TQueryEndSessionEvent; AsFirst: Boolean=true);
|
||||||
@ -1566,7 +1563,7 @@ type
|
|||||||
property OnShowHint: TShowHintEvent read FOnShowHint write FOnShowHint;
|
property OnShowHint: TShowHintEvent read FOnShowHint write FOnShowHint;
|
||||||
property OnUserInput: TOnUserInputEvent read FOnUserInput write FOnUserInput;
|
property OnUserInput: TOnUserInputEvent read FOnUserInput write FOnUserInput;
|
||||||
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
|
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
|
||||||
property OnExceptionCircle: TExceptionEvent read FOnExceptionCircle write FOnExceptionCircle;
|
property OnCircularException: TExceptionEvent read FOnCircularException write FOnCircularException;
|
||||||
property ShowButtonGlyphs: TApplicationShowGlyphs read FShowButtonGlyphs write SetShowButtonGlyphs default sbgAlways;
|
property ShowButtonGlyphs: TApplicationShowGlyphs read FShowButtonGlyphs write SetShowButtonGlyphs default sbgAlways;
|
||||||
property ShowMenuGlyphs: TApplicationShowGlyphs read FShowMenuGlyphs write SetShowMenuGlyphs default sbgAlways;
|
property ShowMenuGlyphs: TApplicationShowGlyphs read FShowMenuGlyphs write SetShowMenuGlyphs default sbgAlways;
|
||||||
property ShowHint: Boolean read FShowHint write SetShowHint;
|
property ShowHint: Boolean read FShowHint write SetShowHint;
|
||||||
|
@ -1195,14 +1195,8 @@ begin
|
|||||||
DebugLn('TApplication.HandleException: ',
|
DebugLn('TApplication.HandleException: ',
|
||||||
'there was another exception during showing the first exception');
|
'there was another exception during showing the first exception');
|
||||||
|
|
||||||
if (ExceptObject is Exception) then
|
if Assigned(OnCircularException) and (ExceptObject is Exception) then
|
||||||
begin
|
OnCircularException(Sender, Exception(ExceptObject));
|
||||||
if Assigned(OnExceptionCircle) then
|
|
||||||
OnExceptionCircle(Sender, Exception(ExceptObject));
|
|
||||||
i := FApplicationHandlers[ahtExceptionCircle].Count;
|
|
||||||
while FApplicationHandlers[ahtException].NextDownIndex(i) do
|
|
||||||
TExceptionEvent(FApplicationHandlers[ahtExceptionCircle][i])(Sender, Exception(ExceptObject));
|
|
||||||
end;
|
|
||||||
|
|
||||||
HaltingProgram:=true;
|
HaltingProgram:=true;
|
||||||
DumpExceptionBackTrace;
|
DumpExceptionBackTrace;
|
||||||
@ -1813,22 +1807,11 @@ begin
|
|||||||
AddHandler(ahtEndSession,TMethod(Handler),AsFirst);
|
AddHandler(ahtEndSession,TMethod(Handler),AsFirst);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TApplication.AddOnExceptionCircleHandler(Handler: TExceptionEvent;
|
|
||||||
AsFirst: Boolean);
|
|
||||||
begin
|
|
||||||
AddHandler(ahtExceptionCircle,TMethod(Handler),AsFirst);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TApplication.RemoveOnEndSessionHandler(Handler: TNotifyEvent);
|
procedure TApplication.RemoveOnEndSessionHandler(Handler: TNotifyEvent);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(ahtEndSession,TMethod(Handler));
|
RemoveHandler(ahtEndSession,TMethod(Handler));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TApplication.RemoveOnExceptionCircleHandler(Handler: TExceptionEvent);
|
|
||||||
begin
|
|
||||||
RemoveHandler(ahtExceptionCircle,TMethod(Handler));
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TApplication.AddOnQueryEndSessionHandler(
|
procedure TApplication.AddOnQueryEndSessionHandler(
|
||||||
Handler: TQueryEndSessionEvent; AsFirst: Boolean);
|
Handler: TQueryEndSessionEvent; AsFirst: Boolean);
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user