equal
deleted
inserted
replaced
4402 " |
4402 " |
4403 |res| |
4403 |res| |
4404 |
4404 |
4405 res := OrderedCollection new. |
4405 res := OrderedCollection new. |
4406 self do:[:el| res add:(aBlock value:el)]. |
4406 self do:[:el| res add:(aBlock value:el)]. |
4407 ^ res |
4407 ^ res |
4408 ! |
4408 ! |
4409 |
4409 |
4410 do:aOneArgBlock |
4410 do:aOneArgBlock |
4411 "evaluate the argument, aBlock for each item in the selection |
4411 "evaluate the argument, aBlock for each item in the selection |
4412 " |
4412 " |
4425 |keptSelection| |
4425 |keptSelection| |
4426 |
4426 |
4427 "/ the selection may change at any time (may it?) |
4427 "/ the selection may change at any time (may it?) |
4428 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4428 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4429 "/ but if so, then start may no longer be valid here?? |
4429 "/ but if so, then start may no longer be valid here?? |
4430 ^ keptSelection from:start do:aOneArgBlock |
4430 keptSelection from:start do:aOneArgBlock |
4431 |
4431 |
4432 "Modified (comment): / 12-02-2017 / 11:52:57 / cg" |
4432 "Modified (comment): / 12-02-2017 / 11:52:57 / cg" |
4433 ! |
4433 ! |
4434 |
4434 |
4435 from:start to:stop do:aOneArgBlock |
4435 from:start to:stop do:aOneArgBlock |
4439 |keptSelection| |
4439 |keptSelection| |
4440 |
4440 |
4441 "/ the selection may change at any time (may it?) |
4441 "/ the selection may change at any time (may it?) |
4442 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4442 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4443 "/ but if so, then start and stop may no longer be valid here?? |
4443 "/ but if so, then start and stop may no longer be valid here?? |
4444 ^ keptSelection from:start to:stop do:aOneArgBlock |
4444 keptSelection from:start to:stop do:aOneArgBlock |
4445 |
4445 |
4446 "Modified (comment): / 12-02-2017 / 11:52:25 / cg" |
4446 "Modified (comment): / 12-02-2017 / 11:52:25 / cg" |
4447 ! |
4447 ! |
4448 |
4448 |
4449 reverseDo:aOneArgBlock |
4449 reverseDo:aOneArgBlock |
4451 " |
4451 " |
4452 |keptSelection| |
4452 |keptSelection| |
4453 |
4453 |
4454 "/ the selection may change at any time (may it?) |
4454 "/ the selection may change at any time (may it?) |
4455 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4455 (keptSelection := selection) isNil ifTrue:[^ nil]. |
4456 ^ keptSelection reverseDo:aOneArgBlock |
4456 keptSelection reverseDo:aOneArgBlock |
4457 |
4457 |
4458 "Modified: / 12-02-2017 / 11:50:02 / cg" |
4458 "Modified: / 12-02-2017 / 11:50:02 / cg" |
4459 ! |
4459 ! |
4460 |
4460 |
4461 select:aBlock |
4461 select:aBlock |
4464 " |
4464 " |
4465 |res| |
4465 |res| |
4466 |
4466 |
4467 res := OrderedCollection new. |
4467 res := OrderedCollection new. |
4468 self do:[:el| (aBlock value:el) ifTrue:[res add:el] ]. |
4468 self do:[:el| (aBlock value:el) ifTrue:[res add:el] ]. |
4469 ^ res |
4469 ^ res |
4470 ! ! |
4470 ! ! |
4471 |
4471 |
4472 !ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection protocol'! |
4472 !ViewTreeInspectorApplication::ViewTreeModel methodsFor:'selection protocol'! |
4473 |
4473 |
4474 changed:aParameter with:oldSelection |
4474 changed:aParameter with:oldSelection |