equal
deleted
inserted
replaced
1287 self selectionDo:[:el| self showSelected:el ] |
1287 self selectionDo:[:el| self showSelected:el ] |
1288 ]. |
1288 ]. |
1289 ! |
1289 ! |
1290 |
1290 |
1291 singleSelection |
1291 singleSelection |
1292 "checks whether one element is selected; in this case the element is |
1292 "checks whether a single element is selected; in this case the element is |
1293 returned otherwise nil |
1293 returned otherwise nil" |
1294 " |
1294 |
1295 |coll| |
1295 |sel| |
1296 |
1296 |
1297 (coll := self selection) isCollection ifFalse:[ |
1297 sel := self selection. |
1298 ^ coll |
1298 sel isCollection ifTrue:[ |
1299 ]. |
1299 sel := sel size == 1 ifTrue:[sel first] ifFalse:[nil]. |
1300 |
1300 ]. |
1301 coll size == 1 ifTrue:[ ^ coll first]. |
1301 ^ sel |
1302 ^ nil |
|
1303 ! |
1302 ! |
1304 |
1303 |
1305 singleSelectionDo:aBlock |
1304 singleSelectionDo:aBlock |
1306 "checks whether one element is selected; in this case the block |
1305 "checks whether one element is selected; in this case the block |
1307 with argument the selected instance will be processed |
1306 with argument the selected instance will be processed |