author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 08 Jun 2011 22:53:07 +0100 | |
branch | jv |
changeset 17841 | 7abcc4aef871 |
parent 17834 | 04ff72c5039a |
child 17845 | 7e0cfaac936d |
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 |
||
6878
3fffe99cc074
avoid AbortSignal to handle AbortAllSignal
Claus Gittinger <cg@exept.de>
parents:
6876
diff
changeset
|
14 |
ControlRequest subclass:#AbortAllOperationRequest |
6876 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Kernel-Exceptions-Control' |
|
19 |
! |
|
20 |
||
21 |
!AbortAllOperationRequest class methodsFor:'documentation'! |
|
22 |
||
7588 | 23 |
copyright |
24 |
" |
|
25 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
6876 | 37 |
documentation |
38 |
" |
|
39 |
Raised by some dialogs 'Cancel All' button. |
|
40 |
||
6879 | 41 |
If unhandled, this is equivalent to raising the AbortOperationRequest. |
42 |
However, some applications catch this signal when performing an operation |
|
6876 | 43 |
on multiple objects (such as a fileBrowser, when deleting multiple files). |
6879 | 44 |
In these situations, Abort is typically cought to cancel a single |
45 |
operation, while AbortAll is used to cancel the whole action. |
|
46 |
" |
|
47 |
! ! |
|
6876 | 48 |
|
8326
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
49 |
!AbortAllOperationRequest class methodsFor:'initialization'! |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
50 |
|
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
51 |
initialize |
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 |
NotifierString := 'abort all operations requested'. |
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 |
" |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
56 |
self initialize |
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 |
! ! |
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
59 |
|
17834 | 60 |
!AbortAllOperationRequest class methodsFor:'special handling'! |
61 |
||
62 |
handleAndAnswerQueryIn:aBlock |
|
63 |
"evaluate aBlock, and return immediately, if the AbortAllRequest is raised. |
|
64 |
Answer any query if AllOperationWanted with true." |
|
65 |
||
66 |
self handle:[:ex | |
|
67 |
] do:[ |
|
68 |
AbortAllOperationWantedQuery |
|
69 |
answer:true |
|
70 |
do:aBlock |
|
71 |
]. |
|
72 |
||
73 |
" |
|
74 |
AbortAllOperationRequest handleAndAnswerQueryIn:[ |
|
75 |
AbortAllOperationWantedQuery query ifTrue:[ |
|
76 |
self halt. |
|
77 |
AbortAllOperationRequest raise. |
|
78 |
]. |
|
79 |
]. |
|
80 |
" |
|
81 |
||
82 |
"Created: / 09-02-2011 / 13:58:01 / cg" |
|
83 |
! ! |
|
84 |
||
6876 | 85 |
!AbortAllOperationRequest class methodsFor:'documentation'! |
86 |
||
87 |
version |
|
17841 | 88 |
^ '$Id: AbortAllOperationRequest.st 10643 2011-06-08 21:53:07Z vranyj1 $' |
17761
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
89 |
! |
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
90 |
|
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
91 |
version_SVN |
17841 | 92 |
^ '$Id: AbortAllOperationRequest.st 10643 2011-06-08 21:53:07Z vranyj1 $' |
17834 | 93 |
! |
94 |
||
95 |
version_CVS |
|
17841 | 96 |
^ 'Header: /cvs/stx/stx/libbasic/AbortAllOperationRequest.st,v 1.8 2011/02/09 12:59:00 cg Exp ' |
6876 | 97 |
! ! |
8326
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
98 |
|
be991fbe6e95
Convert more instance based exceptions to class based exceptions
Stefan Vogel <sv@exept.de>
parents:
7632
diff
changeset
|
99 |
AbortAllOperationRequest initialize! |
17834 | 100 |
|
17841 | 101 |