author | Stefan Vogel <sv@exept.de> |
Fri, 19 Jan 2018 10:40:24 +0100 | |
changeset 22453 | 5935c74b8ca0 |
parent 22158 | 42332978ab0e |
child 23869 | 2dd631fd841e |
permissions | -rw-r--r-- |
7588 | 1 |
" |
2 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
6876 | 12 |
"{ Package: 'stx:libbasic' }" |
13 |
||
22158 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
6878
3fffe99cc074
avoid AbortSignal to handle AbortAllSignal
Claus Gittinger <cg@exept.de>
parents:
6876
diff
changeset
|
16 |
ControlRequest subclass:#AbortAllOperationRequest |
6876 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Kernel-Exceptions-Control' |
|
21 |
! |
|
22 |
||
23 |
!AbortAllOperationRequest class methodsFor:'documentation'! |
|
24 |
||
7588 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
6876 | 39 |
documentation |
40 |
" |
|
22158 | 41 |
Raised by some dialog's 'Cancel All' button. |
6876 | 42 |
|
6879 | 43 |
If unhandled, this is equivalent to raising the AbortOperationRequest. |
44 |
However, some applications catch this signal when performing an operation |
|
6876 | 45 |
on multiple objects (such as a fileBrowser, when deleting multiple files). |
14701
50c3faf6eb60
class: AbortAllOperationRequest
Claus Gittinger <cg@exept.de>
parents:
13300
diff
changeset
|
46 |
In these situations, Abort is typically caught to cancel a single |
6879 | 47 |
operation, while AbortAll is used to cancel the whole action. |
48 |
" |
|
49 |
! ! |
|
6876 | 50 |
|
8326
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
51 |
!AbortAllOperationRequest class methodsFor:'initialization'! |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
52 |
|
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
53 |
initialize |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
54 |
|
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
55 |
NotifierString := 'abort all operations requested'. |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
56 |
|
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
57 |
" |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
58 |
self initialize |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
59 |
" |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
60 |
! ! |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
61 |
|
13300
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
62 |
!AbortAllOperationRequest class methodsFor:'special handling'! |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
63 |
|
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
64 |
handleAndAnswerQueryIn:aBlock |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
65 |
"evaluate aBlock, and return immediately, if the AbortAllRequest is raised. |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
66 |
Answer any query if AllOperationWanted with true." |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
67 |
|
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
68 |
self handle:[:ex | |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
69 |
] do:[ |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
70 |
AbortAllOperationWantedQuery |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
71 |
answer:true |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
72 |
do:aBlock |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
73 |
]. |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
74 |
|
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
75 |
" |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
76 |
AbortAllOperationRequest handleAndAnswerQueryIn:[ |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
77 |
AbortAllOperationWantedQuery query ifTrue:[ |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
78 |
self halt. |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
79 |
AbortAllOperationRequest raise. |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
80 |
]. |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
81 |
]. |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
82 |
" |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
83 |
|
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
84 |
"Created: / 09-02-2011 / 13:58:01 / cg" |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
85 |
! ! |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
86 |
|
6876 | 87 |
!AbortAllOperationRequest class methodsFor:'documentation'! |
88 |
||
89 |
version |
|
22158 | 90 |
^ '$Header$' |
13300
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
91 |
! |
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
92 |
|
4f27b386fa14
added: #handleAndAnswerQueryIn:
Claus Gittinger <cg@exept.de>
parents:
8675
diff
changeset
|
93 |
version_CVS |
22158 | 94 |
^ '$Header$' |
6876 | 95 |
! ! |
8326
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
96 |
|
14701
50c3faf6eb60
class: AbortAllOperationRequest
Claus Gittinger <cg@exept.de>
parents:
13300
diff
changeset
|
97 |
|
8326
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
98 |
AbortAllOperationRequest initialize! |