4411 "evaluate the argument, aBlock for each item in the selection |
4411 "evaluate the argument, aBlock for each item in the selection |
4412 " |
4412 " |
4413 |keptSelection| |
4413 |keptSelection| |
4414 |
4414 |
4415 "/ the selection may change at any time (may it?) |
4415 "/ the selection may change at any time (may it?) |
4416 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4416 (keptSelection := selection) notNil ifTrue:[ |
4417 keptSelection do:aOneArgBlock |
4417 keptSelection do:aOneArgBlock |
|
4418 ]. |
4418 |
4419 |
4419 "Modified (format): / 12-02-2017 / 11:53:23 / cg" |
4420 "Modified (format): / 12-02-2017 / 11:53:23 / cg" |
4420 ! |
4421 ! |
4421 |
4422 |
4422 from:start do:aOneArgBlock |
4423 from:start do:aOneArgBlock |
4423 "evaluate the argument, aBlock for the items starting at index start |
4424 "evaluate the argument, aBlock for the items starting at index start |
4424 " |
4425 " |
4425 |keptSelection| |
4426 |keptSelection| |
4426 |
4427 |
4427 "/ the selection may change at any time (may it?) |
4428 "/ the selection may change at any time (may it?) |
4428 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4429 (keptSelection := selection) notNil ifTrue:[ |
4429 "/ but if so, then start may no longer be valid here?? |
4430 "/ but if so, then start may no longer be valid here?? |
4430 keptSelection from:start do:aOneArgBlock |
4431 keptSelection from:start do:aOneArgBlock |
|
4432 ]. |
4431 |
4433 |
4432 "Modified (comment): / 12-02-2017 / 11:52:57 / cg" |
4434 "Modified (comment): / 12-02-2017 / 11:52:57 / cg" |
4433 ! |
4435 ! |
4434 |
4436 |
4435 from:start to:stop do:aOneArgBlock |
4437 from:start to:stop do:aOneArgBlock |
4437 stop in the selection. |
4439 stop in the selection. |
4438 " |
4440 " |
4439 |keptSelection| |
4441 |keptSelection| |
4440 |
4442 |
4441 "/ the selection may change at any time (may it?) |
4443 "/ the selection may change at any time (may it?) |
4442 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4444 (keptSelection := selection) notNil ifTrue:[ |
4443 "/ but if so, then start and stop may no longer be valid here?? |
4445 "/ but if so, then start and stop may no longer be valid here?? |
4444 keptSelection from:start to:stop do:aOneArgBlock |
4446 keptSelection from:start to:stop do:aOneArgBlock |
|
4447 ]. |
4445 |
4448 |
4446 "Modified (comment): / 12-02-2017 / 11:52:25 / cg" |
4449 "Modified (comment): / 12-02-2017 / 11:52:25 / cg" |
4447 ! |
4450 ! |
4448 |
4451 |
4449 reverseDo:aOneArgBlock |
4452 reverseDo:aOneArgBlock |
4450 "evaluate the argument, aBlock for each item in the selection |
4453 "evaluate the argument, aBlock for each item in the selection |
4451 " |
4454 " |
4452 |keptSelection| |
4455 |keptSelection| |
4453 |
4456 |
4454 "/ the selection may change at any time (may it?) |
4457 "/ the selection may change at any time (may it?) |
4455 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4458 (keptSelection := selection) notNil ifTrue:[ |
4456 keptSelection reverseDo:aOneArgBlock |
4459 keptSelection reverseDo:aOneArgBlock |
|
4460 ]. |
4457 |
4461 |
4458 "Modified: / 12-02-2017 / 11:50:02 / cg" |
4462 "Modified: / 12-02-2017 / 11:50:02 / cg" |
4459 ! |
4463 ! |
4460 |
4464 |
4461 select:aBlock |
4465 select:aBlock |