author | Claus Gittinger <cg@exept.de> |
Sun, 16 Jun 2013 10:40:06 +0200 | |
changeset 3005 | 36ada1348967 |
parent 2903 | 80af520506e8 |
child 3006 | 1847bcaf8018 |
permissions | -rw-r--r-- |
2337
755696d72648
comment/format in: #asSoundexCode
Claus Gittinger <cg@exept.de>
parents:
2303
diff
changeset
|
1 |
"{ Package: 'stx:libbasic2' }"! |
1668 | 2 |
|
2288 | 3 |
!CharacterArray methodsFor:'matching - phonetic'! |
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
4 |
|
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
5 |
asKoelnerPhoneticCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
6 |
"return a koelner phonetic code. |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
7 |
The koelnerPhonetic code is for the german language what the soundex code is for english; |
2303 | 8 |
it returns simular strings for similar sounding words. |
9 |
There are some differences to soundex, though: |
|
10 |
its length is not limited to 4, but depends on the length of the original string; |
|
11 |
it does not start with the first character of the input. |
|
2288 | 12 |
|
13 |
Caveat: this phonetic code is especially suited for german words. |
|
2303 | 14 |
Please have a look at the other phonetic comparison operators found |
15 |
in PhoneticStringUtilities." |
|
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
16 |
|
2303 | 17 |
^ PhoneticStringUtilities koelnerPhoneticCodeOf:self |
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
18 |
|
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
19 |
" |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
20 |
#( |
2303 | 21 |
'Müller' |
22 |
'Miller' |
|
23 |
'Mueller' |
|
24 |
'Mühler' |
|
25 |
'Mühlherr' |
|
26 |
'Mülherr' |
|
27 |
'Myler' |
|
28 |
'Millar' |
|
29 |
'Myller' |
|
30 |
'Müllar' |
|
31 |
'Müler' |
|
32 |
'Muehler' |
|
33 |
'Mülller' |
|
34 |
'Müllerr' |
|
35 |
'Muehlherr' |
|
36 |
'Muellar' |
|
37 |
'Mueler' |
|
38 |
'Mülleer' |
|
39 |
'Mueller' |
|
40 |
'Nüller' |
|
41 |
'Nyller' |
|
42 |
'Niler' |
|
43 |
'Czerny' |
|
44 |
'Tscherny' |
|
45 |
'Czernie' |
|
46 |
'Tschernie' |
|
47 |
'Schernie' |
|
48 |
'Scherny' |
|
49 |
'Scherno' |
|
50 |
'Czerne' |
|
51 |
'Zerny' |
|
52 |
'Tzernie' |
|
53 |
'Breschnew' |
|
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
54 |
) do:[:w | |
2303 | 55 |
Transcript show:w; show:'->'; showCR:(w asKoelnerPhoneticCode) |
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
56 |
]. |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
57 |
" |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
58 |
|
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
59 |
" |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
60 |
'Breschnew' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
61 |
'Breschnew' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
62 |
'Breschneff' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
63 |
'Braeschneff' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
64 |
'Braessneff' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
65 |
'Pressneff' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
66 |
'Presznäph' asKoelnerPhoneticCode -> '17863' |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
67 |
" |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
68 |
! ! |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
69 |
|
2288 | 70 |
!CharacterArray methodsFor:'matching - phonetic'! |
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
71 |
|
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
72 |
asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
73 |
"return a soundex phonetic code or nil. |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
74 |
Soundex returns similar codes for similar sounding words, making it a useful |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
75 |
tool when searching for words where the correct spelling is unknown. |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
76 |
(read Knuth or search the web if you dont know what a soundex code is). |
2288 | 77 |
|
2337
755696d72648
comment/format in: #asSoundexCode
Claus Gittinger <cg@exept.de>
parents:
2303
diff
changeset
|
78 |
Caveat: 'similar sounding words' means: 'similar sounding in ENGLISH' |
2435 | 79 |
Please have a look at the other phonetic comparison operators found |
80 |
in PhoneticStringUtilities." |
|
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
81 |
|
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
82 |
^ PhoneticStringUtilities soundexCodeOf:self |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
83 |
|
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
84 |
" |
2303 | 85 |
'claus' asSoundexCode |
2199
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
86 |
'clause' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
87 |
'close' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
88 |
'smalltalk' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
89 |
'smaltalk' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
90 |
'smaltak' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
91 |
'smaltok' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
92 |
'smoltok' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
93 |
'aa' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
94 |
'by' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
95 |
'bab' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
96 |
'bob' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
97 |
'bop' asSoundexCode |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
98 |
" |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
99 |
! ! |
a9d3b1aa9f03
phonetic stuff extraced into libbasic2
Claus Gittinger <cg@exept.de>
parents:
2150
diff
changeset
|
100 |
|
2241 | 101 |
!CharacterArray methodsFor:'printing & storing'! |
102 |
||
2303 | 103 |
printf:args |
104 |
"Format and print the receiver with <args> formatted in C style, |
|
2295 | 105 |
as specified in the Unix C-language manual page for printf(3). |
106 |
Return the resulting string. |
|
2241 | 107 |
|
108 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
2303 | 109 |
|
2241 | 110 |
|aStream| |
111 |
||
112 |
aStream := WriteStream on:String new. |
|
2260 | 113 |
self printf:args on:aStream. |
2241 | 114 |
^ aStream contents |
115 |
||
116 |
" |
|
2303 | 117 |
Transcript showCR:('%05x %d %f %o' printf:{ 123. 234*5. 1.234. 8r377 } ) |
2256 | 118 |
" |
119 |
||
120 |
" |
|
2241 | 121 |
Transcript showCR: 'Some examples:'!! |
122 |
||
123 |
Transcript show:'''%#x %#X %03o%*.*s'' printf: #(16rABCD 16rEF 5 9 5 ''ghijklmn'') = .'. |
|
2303 | 124 |
Transcript show: ('%#x %#X %03o%*.*s' printf: #(16rABCD 16rEF 5 9 5 'ghijklmn')). |
2241 | 125 |
Transcript showCR: '.' |
126 |
||
127 |
Transcript show: '''%- 10.4s%.2e'' printf: (Array with: ''abcdefghijkl'' with: Float pi) = .'. |
|
2303 | 128 |
Transcript show: ('%- 10.4s%.2e' printf: (Array with: 'abcdefghijkl' with: Float pi)). |
2241 | 129 |
Transcript showCR: '.' |
130 |
||
131 |
Transcript show: '''%8.3f'' printf: (Array with: 200 sqrt negated) = .'. |
|
132 |
Transcript show: ('%8.3f' printf: (Array with: 200 sqrt negated)). |
|
133 |
Transcript showCR: '.' |
|
134 |
||
135 |
Transcript show: '''%c'' printf: #(16r41) = .'. |
|
136 |
Transcript show: ('%c' printf: #(16r41)). |
|
137 |
Transcript showCR: '.' |
|
138 |
||
139 |
Transcript show: '''%f%2s%s%s%s'' sscanf: ''237.0 this is a test'' = '. |
|
140 |
Transcript showCR: ('%f%2s%s%s%s' sscanf: '237.0 this is a test') printString. |
|
141 |
||
142 |
Transcript show: '''%d%f%s'' sscanf: ''25 54.32e-01 monday'' = '. |
|
143 |
Transcript showCR: ('%d%f%s' sscanf: '25 54.32e-01 monday') printString. |
|
144 |
||
145 |
Transcript show: '''%f%*f %8[A-F0-9]%c%d 0x%x%f'' sscanf: ''12.45 1048.73 AE40Z527 0x75BCD15 34'' = '. |
|
146 |
Transcript showCR: ('%f%*f %8[A-F0-9]%c%d 0x%x%f' sscanf: '12.45 1048.73 AE40Z527 0x75BCD15 34') printString. |
|
147 |
" |
|
148 |
! ! |
|
149 |
||
150 |
!CharacterArray methodsFor:'printing & storing'! |
|
151 |
||
2260 | 152 |
printf:args on:outStream |
153 |
"Format and print the receiver on <outStream> with <args> |
|
154 |
formatted in C style, as specified in the Unix C-language manual page for printf(3). |
|
155 |
||
156 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
2303 | 157 |
|
2260 | 158 |
|argStream inStream char| |
159 |
||
160 |
argStream := ReadStream on:args. |
|
161 |
inStream := ReadStream on:self. |
|
162 |
[ inStream atEnd ] whileFalse:[ |
|
2303 | 163 |
(char := inStream next) == $% ifFalse:[ |
164 |
outStream nextPut:char |
|
165 |
] ifTrue:[ |
|
166 |
self |
|
167 |
printf_printArgFrom:inStream |
|
168 |
to:outStream |
|
169 |
withData:argStream |
|
170 |
] |
|
2260 | 171 |
] |
172 |
! ! |
|
173 |
||
174 |
!CharacterArray methodsFor:'printing & storing'! |
|
175 |
||
2303 | 176 |
printfWith:arg1 |
2295 | 177 |
"Format and print the receiver with <arg1> formatted in C style, |
178 |
as specified in the Unix C-language manual page for printf(3). |
|
179 |
Return the resulting string." |
|
2303 | 180 |
|
2256 | 181 |
^ self printf:(Array with:arg1) |
182 |
||
183 |
" |
|
2303 | 184 |
Transcript showCR:('%05x' printfWith:123) |
2256 | 185 |
" |
186 |
! ! |
|
187 |
||
188 |
!CharacterArray methodsFor:'printing & storing'! |
|
189 |
||
2303 | 190 |
printfWith:arg1 with:arg2 |
191 |
"Format and print the receiver with <argI> formatted in C style, |
|
2295 | 192 |
as specified in the Unix C-language manual page for printf(3). |
193 |
Return the resulting string." |
|
2303 | 194 |
|
2256 | 195 |
^ self printf:(Array with:arg1 with:arg2) |
196 |
||
197 |
" |
|
2303 | 198 |
Transcript showCR:('%d %05x' printfWith:123 with:234) |
2256 | 199 |
" |
200 |
! ! |
|
201 |
||
202 |
!CharacterArray methodsFor:'printing & storing'! |
|
203 |
||
204 |
printfWith:arg1 with:arg2 with:arg3 |
|
2303 | 205 |
"Format and print the receiver with <argI> formatted in C style, |
2295 | 206 |
as specified in the Unix C-language manual page for printf(3). |
207 |
Return the resulting string." |
|
2303 | 208 |
|
2256 | 209 |
^ self printf:(Array with:arg1 with:arg2 with:arg3) |
210 |
||
211 |
" |
|
2303 | 212 |
Transcript showCR:('%d %05x %08o' printfWith:123 with:234 with:345) |
2256 | 213 |
" |
214 |
! ! |
|
215 |
||
216 |
!CharacterArray methodsFor:'printing & storing'! |
|
217 |
||
218 |
printfWith:arg1 with:arg2 with:arg3 with:arg4 |
|
2303 | 219 |
"Format and print the receiver with <argI> formatted in C style, |
2295 | 220 |
as specified in the Unix C-language manual page for printf(3). |
221 |
Return the resulting string." |
|
2303 | 222 |
|
2256 | 223 |
^ self printf:(Array with:arg1 with:arg2 with:arg3 with:arg4) |
224 |
||
225 |
" |
|
2303 | 226 |
Transcript showCR:('%d %05x %08o %b' printfWith:123 with:234 with:345 with:123) |
2256 | 227 |
" |
228 |
! ! |
|
229 |
||
230 |
!CharacterArray methodsFor:'printing & storing'! |
|
231 |
||
2241 | 232 |
printf_formatArgCount |
233 |
"Return the number of arguments required/produced if the receiver is interpreted |
|
234 |
as a printf/scanf format control string. |
|
235 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
2303 | 236 |
|
2241 | 237 |
|nonConsecutive count| |
238 |
||
239 |
nonConsecutive := true. |
|
240 |
count := 0. |
|
2303 | 241 |
self do:[:c | |
242 |
c == $% ifTrue:[ |
|
243 |
nonConsecutive ifTrue:[ |
|
244 |
count := count + 1. |
|
245 |
nonConsecutive := false |
|
246 |
] ifFalse:[ |
|
247 |
count := count - 1. |
|
248 |
nonConsecutive := true |
|
249 |
] |
|
250 |
] ifFalse:[ |
|
251 |
nonConsecutive := true |
|
252 |
] |
|
2241 | 253 |
]. |
254 |
^ count |
|
255 |
! ! |
|
256 |
||
257 |
!CharacterArray methodsFor:'printing & storing'! |
|
258 |
||
2260 | 259 |
printf_printOn:outStream withData:args |
260 |
<resource: #obsolete> |
|
2303 | 261 |
|
2241 | 262 |
"Format and print the receiver on <outStream> with <args> |
263 |
formatted in C style, as specified in the Unix C-language manual page for printf(3). |
|
264 |
||
265 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
266 |
||
2260 | 267 |
self obsoleteMethodWarning:'use printf:on:'. |
268 |
self printf:args on:outStream |
|
2241 | 269 |
! ! |
270 |
||
271 |
!CharacterArray methodsFor:'converting'! |
|
272 |
||
2303 | 273 |
scanf:dataStream |
2241 | 274 |
"Return a Collection of objects found in the Character Stream |
2303 | 275 |
<dataStream> as interpreted according to the receiver. |
2241 | 276 |
The receiver is assumed to be a conversion control string as |
277 |
specified in the Unix C-language manual page for scanf(3). |
|
278 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
2303 | 279 |
|
2241 | 280 |
|results format char| |
281 |
||
282 |
results := OrderedCollection new. |
|
283 |
format := ReadStream on:self. |
|
284 |
[ format atEnd ] whileFalse:[ |
|
2303 | 285 |
char := format next. |
286 |
(char == Character space or:[ char == Character tab ]) ifTrue:[ |
|
287 |
dataStream skipSeparators. |
|
288 |
format skipSeparators |
|
289 |
]. |
|
290 |
char == $% ifTrue:[ |
|
291 |
self |
|
292 |
scanf_scanArgFrom:dataStream |
|
293 |
to:results |
|
294 |
format:format |
|
295 |
] ifFalse:[ |
|
296 |
dataStream peekFor:char |
|
297 |
] |
|
2241 | 298 |
]. |
299 |
^ results |
|
300 |
||
301 |
" |
|
2303 | 302 |
'%d %x' scanf:(ReadStream on:'1234 ff00') |
2241 | 303 |
" |
304 |
! ! |
|
305 |
||
306 |
!CharacterArray methodsFor:'private'! |
|
307 |
||
2303 | 308 |
scanf_scanArgFrom:dataStream to:collection format:format |
2241 | 309 |
"Add to <collection> an object who's representation is found |
310 |
in <dataStream> interpreted according to the conversion |
|
2303 | 311 |
control string in the Stream <format>. |
312 |
<format> is assumed to be positioned just past a $%, and a complete control |
|
2241 | 313 |
string is assumed available. |
314 |
||
315 |
Return when the conversion control string is consumed. Leave |
|
316 |
<format> pointing past the last character in the conversion |
|
317 |
control string, leave <dataStream> pointing past any width |
|
318 |
specified in <format>, or at the first character that doesn't |
|
319 |
make sense for the <format>. |
|
320 |
||
321 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
2303 | 322 |
|
2241 | 323 |
|final width char pos data scanset exclusive return last| |
324 |
||
2303 | 325 |
final := [:retval | |
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
326 |
collection add:retval. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
327 |
data == dataStream ifFalse:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
328 |
dataStream position:dataStream position + data position |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
329 |
]. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
330 |
^ self |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
331 |
]. |
2241 | 332 |
width := 0. |
333 |
char := format peek. |
|
334 |
char == $% ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
335 |
^ dataStream peekFor:char |
2241 | 336 |
]. |
337 |
char == $* ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
338 |
format next. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
339 |
char := format peek. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
340 |
final := [:retval | |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
341 |
data == dataStream ifFalse:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
342 |
dataStream position:dataStream position + data position |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
343 |
]. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
344 |
^ self |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
345 |
] |
2241 | 346 |
]. |
347 |
char isDigit ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
348 |
width := Integer readFrom:format. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
349 |
char := format peek |
2241 | 350 |
]. |
351 |
('slhduoxfeg' includes:char) ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
352 |
dataStream skipSeparators |
2241 | 353 |
]. |
354 |
width = 0 ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
355 |
data := dataStream |
2241 | 356 |
] ifFalse:[ |
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
357 |
pos := dataStream position. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
358 |
data := ReadStream on:(dataStream next:width). |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
359 |
dataStream position:pos |
2241 | 360 |
]. |
361 |
char == $s ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
362 |
final value:(data upToSeparator) |
2241 | 363 |
]. |
364 |
char == $c ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
365 |
width = 0 ifTrue:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
366 |
final value:(String with:data next) |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
367 |
] ifFalse:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
368 |
final value:data contents |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
369 |
] |
2241 | 370 |
]. |
371 |
char == $[ "What a mess!!" ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
372 |
return := WriteStream on:(String new:8). |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
373 |
scanset := IdentitySet new. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
374 |
format next. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
375 |
width = 0 ifTrue:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
376 |
width := SmallInteger maxVal |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
377 |
]. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
378 |
exclusive := format peekFor:$^. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
379 |
[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
380 |
last := char. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
381 |
char := format next. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
382 |
char == $] |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
383 |
] whileFalse:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
384 |
char == $- ifFalse:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
385 |
scanset add:char |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
386 |
] ifTrue:[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
387 |
last to:format next do:[:c | |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
388 |
scanset add:c |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
389 |
] |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
390 |
] |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
391 |
]. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
392 |
[ |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
393 |
data atEnd not and:[ (scanset includes:data peek) xor:exclusive ] |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
394 |
] whileTrue:[ return nextPut:data next ]. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
395 |
final value:return contents |
2241 | 396 |
]. |
397 |
('lh' includes:char) ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
398 |
format next. |
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
399 |
char := format peek |
2241 | 400 |
]. |
401 |
('DUdu' includes:char) ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
402 |
final value:(Integer readFrom:data) |
2241 | 403 |
]. |
404 |
('FEGfeg' includes:char) ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
405 |
final value:(Float readFrom:data) |
2241 | 406 |
]. |
2256 | 407 |
('b' includes:char) ifTrue:[ |
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
408 |
final value:(Integer readFrom:data radix:2) |
2256 | 409 |
]. |
2241 | 410 |
('Oo' includes:char) ifTrue:[ |
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
411 |
final value:(Integer readFrom:data radix:8) |
2241 | 412 |
]. |
413 |
('Xx' includes:char) ifTrue:[ |
|
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
414 |
final value:(Integer readFrom:data radix:16) |
2241 | 415 |
] |
2256 | 416 |
|
417 |
" |
|
2303 | 418 |
'%d %x' sscanf:'1234 ff00' |
419 |
'%d %x %b' sscanf:'1234 ff00 1001' |
|
2256 | 420 |
" |
2679
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
421 |
|
cfab54d30fcc
changed: #scanArgFrom:to:format:
Claus Gittinger <cg@exept.de>
parents:
2582
diff
changeset
|
422 |
"Modified: / 29-11-2011 / 11:55:39 / cg" |
2241 | 423 |
! ! |
424 |
||
425 |
!CharacterArray methodsFor:'converting'! |
|
426 |
||
2303 | 427 |
sscanf:string |
2241 | 428 |
"Return a Collection of objects found in <string> as |
2303 | 429 |
interpreted according to the receiver. |
2241 | 430 |
The receiver is assumed to be a conversion control string as |
431 |
specified in the Unix C-language manual page for scanf(3). |
|
432 |
For copyright information, see goodies/String-printf_scanf.chg" |
|
2303 | 433 |
|
2241 | 434 |
^ self scanf:(ReadStream on:string) |
435 |
||
436 |
" |
|
2303 | 437 |
'%d %x' sscanf:'1234 ff00' |
438 |
'%d %x %b' sscanf:'1234 ff00 1001' |
|
2241 | 439 |
" |
440 |
! ! |
|
441 |
||
2237 | 442 |
!Float methodsFor:'private'! |
443 |
||
2303 | 444 |
absDecimalPrintOn:aStream digits:digits |
2237 | 445 |
"Place a string representation of the receiver's abs value |
446 |
on <aStream> using <digits> significant digits, using decimal notation. |
|
447 |
This is a helper for printf." |
|
448 |
||
449 |
|exp x fuzz i| |
|
450 |
||
451 |
"x is myself normalized to (1.0, 10.0), exp is my exponent" |
|
2303 | 452 |
exp := self abs < 1.0 |
453 |
ifTrue:[ (10.0 / self abs) log floor negated ] |
|
454 |
ifFalse:[ self abs log floor ]. |
|
2237 | 455 |
x := self abs / (10.0 raisedTo:exp). |
456 |
fuzz := 10.0 raisedTo:1 - digits. |
|
457 |
"round the last digit to be printed" |
|
458 |
x := 0.5 * fuzz + x. |
|
459 |
x >= 10.0 "check if rounding has unnormalized x" ifTrue:[ |
|
2303 | 460 |
x := x / 10.0. |
461 |
exp := exp + 1 |
|
2237 | 462 |
]. |
463 |
exp < 0 ifTrue:[ |
|
2303 | 464 |
1 to:1 - exp do:[:j | |
465 |
aStream nextPut:('0.000000000000' at:j) |
|
466 |
] |
|
2237 | 467 |
]. |
468 |
[ x >= fuzz ] "use fuzz to track significance" whileTrue:[ |
|
2303 | 469 |
i := x truncated. |
470 |
aStream nextPut:(48 + i) asCharacter. |
|
471 |
x := (x - i) * 10.0. |
|
472 |
fuzz := fuzz * 10.0. |
|
473 |
exp := exp - 1. |
|
474 |
exp = -1 ifTrue:[ |
|
475 |
aStream nextPut:$. |
|
476 |
] |
|
2237 | 477 |
]. |
478 |
[ exp >= -1 ] whileTrue:[ |
|
2303 | 479 |
aStream nextPut:$0. |
480 |
exp := exp - 1. |
|
481 |
exp = -1 ifTrue:[ |
|
482 |
aStream nextPut:$. |
|
483 |
] |
|
2237 | 484 |
] |
485 |
! ! |
|
486 |
||
487 |
!Float methodsFor:'private'! |
|
488 |
||
2303 | 489 |
absPrintOn:aStream digits:digits |
490 |
"Place a string representation of the receiver's abs value on <aStream> using |
|
2237 | 491 |
<digits> significant digits. |
492 |
This is a helper for printf." |
|
2303 | 493 |
|
2237 | 494 |
(self < 1.0e6 and:[ self > 1.0e-4 ]) ifTrue:[ |
2303 | 495 |
self absDecimalPrintOn:aStream digits:digits |
2237 | 496 |
] ifFalse:[ |
2303 | 497 |
self absScientificPrintOn:aStream digits:digits |
2237 | 498 |
] |
499 |
! ! |
|
500 |
||
501 |
!Float methodsFor:'private'! |
|
502 |
||
2303 | 503 |
absScientificPrintOn:aStream digits:digits |
2237 | 504 |
"Place a string representation of the receiver's abs value on <aStream> using <digits> significant |
505 |
digits, using scientific notation. |
|
506 |
This is a helper for printf." |
|
2303 | 507 |
|
2237 | 508 |
|exp fuzz x q i| |
509 |
||
510 |
"x is myself normalized to [1.0, 10.0), exp is my exponent" |
|
2303 | 511 |
exp := self abs < 1.0 |
512 |
ifTrue:[ (10.0 / self abs) log floor negated ] |
|
513 |
ifFalse:[ self abs log floor ]. |
|
2237 | 514 |
x := self abs / (10.0 raisedTo:exp). |
515 |
fuzz := 10.0 raisedTo:1 - digits. |
|
516 |
"round the last digit to be printed" |
|
517 |
x := 0.5 * fuzz + x. |
|
518 |
x >= 10.0 "check if rounding has unnormalized x" ifTrue:[ |
|
2303 | 519 |
x := x / 10.0. |
520 |
exp := exp + 1 |
|
2237 | 521 |
]. |
522 |
q := exp. |
|
523 |
exp := 0. |
|
524 |
[ x >= fuzz ] "use fuzz to track significance" whileTrue:[ |
|
2303 | 525 |
i := x truncated. |
526 |
aStream nextPut:(48 + i) asCharacter. |
|
527 |
x := (x - i) * 10.0. |
|
528 |
fuzz := fuzz * 10.0. |
|
529 |
exp := exp - 1. |
|
530 |
exp = -1 ifTrue:[ |
|
531 |
aStream nextPut:$. |
|
532 |
] |
|
2237 | 533 |
]. |
534 |
[ exp >= -1 ] whileTrue:[ |
|
2303 | 535 |
aStream nextPut:$0. |
536 |
exp := exp - 1. |
|
537 |
exp = -1 ifTrue:[ |
|
538 |
aStream nextPut:$. |
|
539 |
] |
|
2237 | 540 |
]. |
541 |
aStream nextPut:$e. |
|
542 |
q printOn:aStream |
|
543 |
! ! |
|
544 |
||
1759 | 545 |
!Object methodsFor:'dependents-interests'! |
546 |
||
547 |
addInterest:anInterest |
|
548 |
"install an interest forwarder. |
|
549 |
Here, we use the nonWeakDependencies." |
|
550 |
||
551 |
self addNonWeakDependent:anInterest |
|
552 |
||
553 |
"Created: 14.10.1996 / 22:27:34 / stefan" |
|
554 |
! ! |
|
555 |
||
556 |
!Object methodsFor:'dependents-interests'! |
|
557 |
||
558 |
expressInterestIn:aspect for:anObject sendBack:aSelector |
|
559 |
"arrange for aSelector to be sent to anObject whenever the receiver |
|
560 |
changes aspect." |
|
561 |
||
562 |
"/ for now, use an interestConverter, which is somewhat less efficient. |
|
563 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
564 |
||
2303 | 565 |
self addInterest:(InterestConverter |
566 |
destination:anObject |
|
567 |
selector:aSelector |
|
568 |
aspect:aspect) |
|
1759 | 569 |
|
570 |
" |
|
571 |
|p b| |
|
572 |
||
573 |
b := [Transcript showCR:' -> the point changed']. |
|
574 |
||
575 |
p := Point new. |
|
576 |
Transcript showCR:'interest in #foo:'. |
|
577 |
p expressInterestIn:#foo for:b sendBack:#value. |
|
578 |
p x:1. |
|
579 |
Transcript showCR:'now changing #bar ... (expect no notification)'. |
|
580 |
p changed:#bar. |
|
581 |
Transcript cr. |
|
582 |
||
583 |
Delay waitForSeconds:1. |
|
584 |
Transcript showCR:'now changing #foo ... (expect notification)'. |
|
585 |
p changed:#foo. |
|
586 |
Transcript cr. |
|
587 |
||
588 |
Delay waitForSeconds:1. |
|
589 |
Transcript showCR:'no more interest in #foo:'. |
|
590 |
p retractInterestIn:#foo for:b. |
|
591 |
Transcript showCR:'now changing #foo ... (expect no notification)'. |
|
592 |
p changed:#foo. |
|
593 |
Transcript cr. |
|
594 |
||
595 |
Delay waitForSeconds:1. |
|
596 |
Transcript showCR:'interest in #bar now:'. |
|
597 |
p expressInterestIn:#bar for:b sendBack:#value. |
|
598 |
Transcript showCR:'now changing #foo ... (expect no notification)'. |
|
599 |
p changed:#foo. |
|
600 |
Transcript showCR:'now changing #bar ... (expect notification)'. |
|
601 |
p changed:#bar. |
|
602 |
Transcript cr. |
|
603 |
||
604 |
Delay waitForSeconds:1. |
|
605 |
Transcript showCR:'interest in #foo now:'. |
|
606 |
p expressInterestIn:#foo for:b sendBack:#value. |
|
607 |
Transcript showCR:'now changing #foo ... (expect notification)'. |
|
608 |
p changed:#foo. |
|
609 |
Transcript showCR:'now changing #bar ... (expect notification)'. |
|
610 |
p changed:#bar. |
|
611 |
Transcript cr. |
|
612 |
||
613 |
Delay waitForSeconds:1. |
|
614 |
Transcript showCR:'no more interests:'. |
|
615 |
p retractInterestsFor:b. |
|
616 |
Transcript showCR:'now changing #foo ... (expect no notification)'. |
|
617 |
p changed:#foo. |
|
618 |
Transcript showCR:'now changing #bar... (expect no notification)'. |
|
619 |
p changed:#bar. |
|
620 |
Transcript cr. |
|
621 |
||
622 |
p release. |
|
623 |
" |
|
1668 | 624 |
|
1759 | 625 |
"Created: 19.4.1996 / 10:26:22 / cg" |
626 |
"Modified: 19.4.1996 / 12:34:08 / cg" |
|
627 |
"Modified: 14.10.1996 / 22:28:20 / stefan" |
|
628 |
! ! |
|
629 |
||
630 |
!Object methodsFor:'dependents-interests'! |
|
631 |
||
632 |
interests |
|
633 |
"return a Collection of interests - empty if there is none. |
|
634 |
Here, we use the nonWeakDependents for interests." |
|
635 |
||
636 |
^ self nonWeakDependents |
|
637 |
||
638 |
"Created: / 14.10.1996 / 22:20:51 / stefan" |
|
639 |
"Modified: / 30.1.1998 / 14:07:35 / cg" |
|
640 |
! ! |
|
641 |
||
642 |
!Object methodsFor:'dependents-interests'! |
|
643 |
||
644 |
interestsFor:someOne |
|
645 |
"return a collection of interests of someOne - empty if there is none." |
|
646 |
||
647 |
|coll deps| |
|
648 |
||
649 |
deps := self interests. |
|
650 |
deps size == 0 ifTrue:[^ #()]. |
|
651 |
||
652 |
coll := IdentitySet new. |
|
653 |
||
654 |
deps do:[:dep | |
|
2303 | 655 |
(dep isInterestConverter) ifTrue:[ |
656 |
dep destination == someOne ifTrue:[ |
|
657 |
coll add:dep. |
|
658 |
] |
|
659 |
] |
|
1759 | 660 |
]. |
661 |
^ coll |
|
662 |
||
663 |
"Created: / 30.1.1998 / 14:02:26 / cg" |
|
664 |
"Modified: / 30.1.1998 / 14:08:24 / cg" |
|
665 |
! ! |
|
1668 | 666 |
|
1759 | 667 |
!Object methodsFor:'dependents-interests'! |
668 |
||
669 |
onChangeEvaluate:aBlock |
|
670 |
"arrange for aBlock to be evaluated whenever the receiver changes." |
|
671 |
||
2149
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
672 |
|na selector| |
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
673 |
|
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
674 |
na := aBlock numArgs. |
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
675 |
na == 0 ifTrue:[ |
2303 | 676 |
selector := #value |
2149
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
677 |
] ifFalse:[ |
2303 | 678 |
selector := #( #'value:' #'value:value:' #'value:value:value:') at:na |
2149
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
679 |
]. |
329461c02e84
allow for 0,1,2 arguments (update params) to be passed to interest blocks.
Claus Gittinger <cg@exept.de>
parents:
1759
diff
changeset
|
680 |
^ self onChangeSend:selector to:aBlock |
1759 | 681 |
|
682 |
" |
|
683 |
|p b| |
|
684 |
||
685 |
b := [Transcript showCR:' -> the point changed']. |
|
686 |
||
687 |
p := Point new. |
|
688 |
Transcript showCR:'interest in #foo:'. |
|
689 |
p onChangeEvaluate:b. |
|
690 |
p x:1. |
|
691 |
Transcript showCR:'now changing #bar ... (expect no notification)'. |
|
692 |
p changed:#bar. |
|
693 |
||
694 |
p retractInterests. |
|
695 |
p changed:#bar. |
|
696 |
" |
|
697 |
! ! |
|
698 |
||
699 |
!Object methodsFor:'dependents-interests'! |
|
700 |
||
701 |
onChangeSend:aSelector to:anObject |
|
702 |
"arrange for aSelector to be sent to anObject whenever the receiver |
|
703 |
changes." |
|
704 |
||
705 |
"/ for now, use an interestConverter, which is somewhat less efficient. |
|
706 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
707 |
||
708 |
((self interests ? #()) |
|
2303 | 709 |
contains:[:anInterest | |
710 |
(anInterest isInterestConverter) |
|
711 |
and:[ anInterest destination == anObject |
|
712 |
and:[ anInterest selector == aSelector]] |
|
713 |
]) |
|
714 |
ifTrue:[^ self]. |
|
1759 | 715 |
|
2303 | 716 |
self addInterest:(InterestConverter |
717 |
destination:anObject |
|
718 |
selector:aSelector) |
|
1668 | 719 |
|
720 |
" |
|
1759 | 721 |
|p b| |
722 |
||
723 |
b := [Transcript showCR:'the point changed']. |
|
724 |
||
725 |
p := Point new. |
|
726 |
p onChangeSend:#value to:b. |
|
727 |
p x:1. |
|
728 |
Transcript showCR:'now changing'. |
|
729 |
p changed. |
|
730 |
Transcript cr. |
|
731 |
||
732 |
Delay waitForSeconds:1. |
|
733 |
Transcript showCR:'now changing'. |
|
734 |
p changed. |
|
735 |
Transcript cr. |
|
736 |
||
737 |
Delay waitForSeconds:1. |
|
738 |
Transcript showCR:'no more interest'. |
|
739 |
p retractInterestsFor:b. |
|
740 |
Transcript showCR:'now changing again'. |
|
741 |
p changed. |
|
742 |
Transcript cr. |
|
743 |
||
744 |
Delay waitForSeconds:1. |
|
745 |
Transcript showCR:'interest again'. |
|
746 |
p onChangeSend:#value to:b. |
|
747 |
Transcript showCR:'now changing again'. |
|
748 |
p changed. |
|
749 |
Transcript cr. |
|
750 |
" |
|
751 |
||
752 |
"Created: 19.4.1996 / 10:26:38 / cg" |
|
753 |
"Modified: 19.4.1996 / 12:34:26 / cg" |
|
754 |
"Modified: 14.10.1996 / 22:28:27 / stefan" |
|
755 |
! ! |
|
756 |
||
2897
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
757 |
!Object methodsFor:'dependents-st/v event simulation'! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
758 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
759 |
removeActionsForEvent:eventSymbol |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
760 |
"remove ST/V-style event triggers." |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
761 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
762 |
self retractInterestsIn:eventSymbol |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
763 |
! ! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
764 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
765 |
!Object methodsFor:'dependents-st/v event simulation'! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
766 |
|
2903 | 767 |
removeActionsWithReceiver:aReceiver |
768 |
"remove ST/V-style event triggers." |
|
769 |
||
770 |
self retractInterestsFor:aReceiver |
|
771 |
! ! |
|
772 |
||
773 |
!Object methodsFor:'dependents-st/v event simulation'! |
|
774 |
||
2897
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
775 |
removeAllActionsWithReceiver:anObject |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
776 |
"remove ST/V-style event triggers." |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
777 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
778 |
self retractInterestsFor:anObject |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
779 |
! ! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
780 |
|
1759 | 781 |
!Object methodsFor:'dependents-interests'! |
782 |
||
783 |
removeInterest:anInterest |
|
784 |
"remove an interest forwarder. |
|
785 |
Here, we use the nonWeakDependencies." |
|
786 |
||
787 |
self removeNonWeakDependent:anInterest |
|
788 |
||
789 |
"Created: 14.10.1996 / 22:21:59 / stefan" |
|
790 |
! ! |
|
791 |
||
792 |
!Object methodsFor:'dependents-interests'! |
|
793 |
||
794 |
retractInterestIn:aspect for:someOne |
|
795 |
"remove the interest of someOne in the receiver changing aspect |
|
796 |
(as installed with #expressInterestIn:for:sendBack:)." |
|
797 |
||
798 |
"/ for now, remove the interestConverter. |
|
799 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
800 |
||
801 |
self retractInterestsForWhich:[:i | (i aspect == aspect) and:[i destination == someOne]] |
|
802 |
||
1668 | 803 |
" |
1759 | 804 |
|p b| |
805 |
||
806 |
b := [Transcript showCR:'the point changed']. |
|
807 |
||
808 |
p := Point new. |
|
809 |
Transcript showCR:'interest in #foo'. |
|
810 |
p expressInterestIn:#foo for:b sendBack:#value. |
|
811 |
p x:1. |
|
812 |
Transcript showCR:'now changing #bar'. |
|
813 |
p changed:#bar. |
|
814 |
Transcript cr. |
|
815 |
||
816 |
Delay waitForSeconds:1. |
|
817 |
Transcript showCR:'now changing #foo'. |
|
818 |
p changed:#foo. |
|
819 |
Transcript cr. |
|
820 |
||
821 |
Delay waitForSeconds:1. |
|
822 |
Transcript showCR:'no more interest in #foo'. |
|
823 |
p retractInterestIn:#foo for:b. |
|
824 |
Transcript showCR:'now changing #foo'. |
|
825 |
p changed:#foo. |
|
826 |
Transcript cr. |
|
827 |
||
828 |
Delay waitForSeconds:1. |
|
829 |
Transcript showCR:'interest in #bar now'. |
|
830 |
p expressInterestIn:#bar for:b sendBack:#value. |
|
831 |
Transcript showCR:'now changing #foo'. |
|
832 |
p changed:#foo. |
|
833 |
Transcript showCR:'now changing #bar'. |
|
834 |
p changed:#bar. |
|
835 |
Transcript cr. |
|
836 |
||
837 |
Delay waitForSeconds:1. |
|
838 |
Transcript showCR:'interest in #foo now'. |
|
839 |
p expressInterestIn:#foo for:b sendBack:#value. |
|
840 |
Transcript showCR:'now changing #foo'. |
|
841 |
p changed:#foo. |
|
842 |
Transcript showCR:'now changing #bar'. |
|
843 |
p changed:#bar. |
|
844 |
Transcript cr. |
|
845 |
||
846 |
Delay waitForSeconds:1. |
|
847 |
Transcript showCR:'no more interests'. |
|
848 |
p retractInterestsFor:b. |
|
849 |
Transcript showCR:'now changing #foo'. |
|
850 |
p changed:#foo. |
|
851 |
Transcript showCR:'now changing #bar'. |
|
852 |
p changed:#bar. |
|
853 |
Transcript cr. |
|
854 |
" |
|
855 |
||
856 |
"Created: / 19.4.1996 / 10:27:11 / cg" |
|
857 |
"Modified: / 14.10.1996 / 22:21:19 / stefan" |
|
858 |
"Modified: / 30.1.1998 / 14:05:34 / cg" |
|
859 |
! ! |
|
860 |
||
861 |
!Object methodsFor:'dependents-interests'! |
|
862 |
||
863 |
retractInterests |
|
864 |
"remove all interests in the receiver changing aspect |
|
865 |
(as installed with #expressInterestIn:for:sendBack:)." |
|
866 |
||
867 |
"/ for now, remove the interestConverter. |
|
868 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
869 |
||
870 |
self retractInterestsForWhich:[:i | true ] |
|
871 |
! ! |
|
872 |
||
873 |
!Object methodsFor:'dependents-interests'! |
|
874 |
||
875 |
retractInterestsFor:someOne |
|
2303 | 876 |
"remove the interest of someOne in the receiver |
1759 | 877 |
(as installed with #onChangeSend:to:)." |
878 |
||
879 |
"/ for now, remove the interestConverter. |
|
880 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
881 |
||
882 |
self retractInterestsForWhich:[:i | i destination == someOne ] |
|
883 |
||
884 |
" |
|
885 |
|p b| |
|
886 |
||
887 |
b := [Transcript showCR:'the point changed']. |
|
888 |
||
889 |
p := Point new. |
|
890 |
p onChangeSend:#value to:b. |
|
891 |
p x:1. |
|
892 |
Transcript showCR:'now changing'. |
|
893 |
p changed. |
|
894 |
Transcript cr. |
|
895 |
||
896 |
Delay waitForSeconds:1. |
|
897 |
Transcript showCR:'now changing'. |
|
898 |
p changed. |
|
899 |
Transcript cr. |
|
900 |
||
901 |
Delay waitForSeconds:1. |
|
902 |
Transcript showCR:'no more interest'. |
|
903 |
p retractInterestsFor:b. |
|
904 |
Transcript showCR:'now changing again'. |
|
905 |
p changed. |
|
906 |
Transcript cr. |
|
907 |
||
908 |
Delay waitForSeconds:1. |
|
909 |
Transcript showCR:'interest again'. |
|
910 |
p onChangeSend:#value to:b. |
|
911 |
Transcript showCR:'now changing again'. |
|
912 |
p changed. |
|
913 |
Transcript cr. |
|
914 |
" |
|
915 |
||
916 |
"Created: / 19.4.1996 / 10:23:46 / cg" |
|
917 |
"Modified: / 14.10.1996 / 22:21:25 / stefan" |
|
918 |
"Modified: / 30.1.1998 / 14:04:52 / cg" |
|
919 |
! ! |
|
920 |
||
921 |
!Object methodsFor:'dependents-interests'! |
|
922 |
||
923 |
retractInterestsForWhich:aBlock |
|
924 |
"remove all interests in the receiver changing aspect |
|
925 |
(as installed with #expressInterestIn:for:sendBack:)." |
|
926 |
||
927 |
"/ for now, remove the interestConverter. |
|
928 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
929 |
||
930 |
|deps coll| |
|
931 |
||
932 |
deps := self interests. |
|
933 |
deps size ~~ 0 ifTrue:[ |
|
2303 | 934 |
"/ cannot removeDependent within the loop - the interests collection rehashes |
935 |
coll := OrderedCollection new. |
|
936 |
deps do:[:dep | |
|
937 |
dep isInterestConverter ifTrue:[ |
|
938 |
(aBlock value:dep) ifTrue:[coll add:dep]. |
|
939 |
] |
|
940 |
]. |
|
941 |
coll do:[:dep | |
|
942 |
self removeInterest:dep. |
|
943 |
]. |
|
1759 | 944 |
]. |
945 |
! ! |
|
946 |
||
947 |
!Object methodsFor:'dependents-interests'! |
|
948 |
||
949 |
retractInterestsIn:aspect |
|
950 |
"remove all interests in the receiver changing aspect |
|
951 |
(as installed with #expressInterestIn:for:sendBack:)." |
|
952 |
||
953 |
"/ for now, remove the interestConverter. |
|
954 |
"/ In the future, a more intelligent DependencyCollection class is planned for |
|
955 |
||
956 |
self retractInterestsForWhich:[:i | i aspect == aspect ] |
|
1668 | 957 |
! ! |
958 |
||
2901 | 959 |
!Object methodsFor:'Compatibility-Dolphin'! |
960 |
||
961 |
trigger:anAspect |
|
962 |
self changed:anAspect |
|
963 |
! ! |
|
964 |
||
965 |
!Object methodsFor:'Compatibility-Dolphin'! |
|
966 |
||
967 |
trigger:anAspect with:anArgument |
|
968 |
self changed:anAspect with:anArgument |
|
969 |
! ! |
|
970 |
||
971 |
!Object methodsFor:'dependents-st/v event simulation'! |
|
972 |
||
973 |
triggerEvent:aSymbol |
|
974 |
self changed:aSymbol |
|
975 |
! ! |
|
976 |
||
1668 | 977 |
!Object methodsFor:'dependents-st/v event simulation'! |
978 |
||
2897
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
979 |
triggerEvent:eventSymbol with:aParameter |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
980 |
"perform ST/V-style event triggering." |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
981 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
982 |
self changed:eventSymbol with:(Array with:aParameter). |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
983 |
! ! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
984 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
985 |
!Object methodsFor:'dependents-st/v event simulation'! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
986 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
987 |
triggerEvent:eventSymbol withArguments:parameters |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
988 |
"perform ST/V-style event triggering." |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
989 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
990 |
self changed:eventSymbol with:parameters. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
991 |
! ! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
992 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
993 |
!Object methodsFor:'dependents-st/v event simulation'! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
994 |
|
1668 | 995 |
when:eventSymbol send:selector to:anObject |
996 |
"install an ST/V-style interest forwarder. |
|
997 |
Here, we use the nonWeakDependencies." |
|
998 |
||
999 |
self addInterest:(InterestConverterWithParameters |
|
2897
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1000 |
destination:anObject |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1001 |
selector:selector |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1002 |
aspect:eventSymbol). |
1668 | 1003 |
|
1004 |
" |
|
1005 |
|p b| |
|
1006 |
||
1007 |
b := [Transcript showCR:'the point changed']. |
|
1008 |
||
1009 |
p := Point new. |
|
2897
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1010 |
p when:#foo:bar: send:#value:value: to:[:a :b | Transcript show:'foo: '; show:a; show:' bar: '; showCR:b]. |
1668 | 1011 |
Transcript showCR:'now changing'. |
1012 |
p triggerEvent:#foo:bar: withArguments:#('fooArg' 'barArg'). |
|
2897
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1013 |
p removeActionsForEvent:#foo:bar:. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1014 |
" |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1015 |
! ! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1016 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1017 |
!Object methodsFor:'dependents-st/v event simulation'! |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1018 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1019 |
when:eventSymbol send:selector to:anObject with:aParameter |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1020 |
"install an ST/V-style interest forwarder. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1021 |
Here, we use the nonWeakDependencies." |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1022 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1023 |
self addInterest:((InterestConverterWithParameters |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1024 |
destination:anObject |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1025 |
selector:selector |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1026 |
aspect:eventSymbol) |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1027 |
defaultParameters:(Array with:aParameter)). |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1028 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1029 |
" |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1030 |
|p b| |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1031 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1032 |
b := [Transcript showCR:'the point changed']. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1033 |
|
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1034 |
p := Point new. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1035 |
p |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1036 |
when:#foo: |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1037 |
send:#value: |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1038 |
to:[:a | Transcript show:'foo: '; showCR:a] |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1039 |
with:123. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1040 |
Transcript showCR:'now changing'. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1041 |
p triggerEvent:#foo:. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1042 |
p triggerEvent:#foo: with:987. |
3060cf059978
more trigger event simulation stuff
Claus Gittinger <cg@exept.de>
parents:
2679
diff
changeset
|
1043 |
p removeActionsForEvent:#foo:. |
1668 | 1044 |
" |
1045 |
! ! |
|
1046 |
||
2901 | 1047 |
!Object methodsFor:'Compatibility-Dolphin'! |
1048 |
||
1049 |
when:anAspect sendTo:anObject |
|
1050 |
self expressInterestIn:anAspect for:anObject sendBack:anAspect |
|
1051 |
! ! |
|
1052 |
||
2364 | 1053 |
!Stream methodsFor:'stacked computing streams'! |
1054 |
||
1055 |
collecting:aBlock |
|
1056 |
"return a stacked computing stream, which reads elements from the receiver, |
|
1057 |
applies aBlock to each read element, and provides the results as elements to its reader." |
|
1058 |
||
1059 |
^ CollectingReadStream on:self collecting:aBlock |
|
1060 |
! ! |
|
1061 |
||
1062 |
!Stream methodsFor:'stacked computing streams'! |
|
1063 |
||
1064 |
selecting:aBlock |
|
1065 |
"return a stacked computing stream, which reads elements from the receiver, |
|
1066 |
but only provides elements for which aBlock returns true to its reader." |
|
1067 |
||
1068 |
^ SelectingReadStream on:self selecting:aBlock |
|
1069 |
! ! |
|
1070 |
||
2303 | 1071 |
!stx_libbasic2 class methodsFor:'documentation'! |
1072 |
||
1073 |
extensionsVersion_CVS |
|
3005 | 1074 |
^ '$Header: /cvs/stx/stx/libbasic2/extensions.st,v 1.24 2013-06-16 08:40:06 cg Exp $' |
1075 |
! ! |