equal
deleted
inserted
replaced
17 Last edited: 2006-02-03 11:13:33 by piumarta on margaux.local |
17 Last edited: 2006-02-03 11:13:33 by piumarta on margaux.local |
18 " |
18 " |
19 "{ Package: 'stx:libbasic' }" |
19 "{ Package: 'stx:libbasic' }" |
20 |
20 |
21 Dictionary subclass:#GetOpt |
21 Dictionary subclass:#GetOpt |
22 instanceVariableNames:'defaultBlock' |
22 instanceVariableNames:'defaultBlock onErrorBlock' |
23 classVariableNames:'' |
23 classVariableNames:'' |
24 poolDictionaries:'' |
24 poolDictionaries:'' |
25 category:'System-Support' |
25 category:'System-Support' |
26 ! |
26 ! |
27 |
27 |
142 |
142 |
143 !GetOpt methodsFor:'accessing'! |
143 !GetOpt methodsFor:'accessing'! |
144 |
144 |
145 default: unaryBlock |
145 default: unaryBlock |
146 defaultBlock := unaryBlock |
146 defaultBlock := unaryBlock |
|
147 ! |
|
148 |
|
149 onError: unaryBlock |
|
150 onErrorBlock := unaryBlock |
|
151 ! ! |
|
152 |
|
153 !GetOpt methodsFor:'error reporting'! |
|
154 |
|
155 error:aMessage |
|
156 onErrorBlock notNil ifTrue:[ |
|
157 onErrorBlock value:aMessage |
|
158 ]. |
|
159 super error:aMessage |
147 ! ! |
160 ! ! |
148 |
161 |
149 !GetOpt methodsFor:'initialization'! |
162 !GetOpt methodsFor:'initialization'! |
150 |
163 |
151 initializeDefaultBlock |
164 initializeDefaultBlock |
232 ! ! |
245 ! ! |
233 |
246 |
234 !GetOpt class methodsFor:'documentation'! |
247 !GetOpt class methodsFor:'documentation'! |
235 |
248 |
236 version |
249 version |
237 ^ '$Header: /cvs/stx/stx/libbasic/GetOpt.st,v 1.3 2012-05-14 11:02:49 stefan Exp $' |
250 ^ '$Header: /cvs/stx/stx/libbasic/GetOpt.st,v 1.4 2014-07-03 18:46:44 cg Exp $' |
238 ! ! |
251 ! ! |
|
252 |