[squeak-dev] something for the next release
Eliot Miranda
eliot.miranda at gmail.com
Wed Dec 25 05:55:20 UTC 2019
Hi All, Hi Marcel,
in implementing inspectors for the VMMaker I'm wanting to close all
open inspectors associated with a simulation when the simulation window is
closed. I notice in SystemWindow>>delete there is non-generic code (a.k.a.
a horrible hack) for the sketch editors associated palettes. This badly
needs rewriting to be generic. So instead of
delete
...
sketchEditor := self extantSketchEditor.
...
sketchEditor ifNotNil:
[sketchEditor deleteSelfAndSubordinates.
(thisWorld notNil
and: [(aPaintBox := thisWorld paintBoxOrNil) notNil]) ifTrue:
[aPaintBox delete]].
it reads something like
delete
...
dependentMorphs := self dependentMorphsOrNil.
...
dependentMorphs ifNotNil:
[dependentMorphs do: [:each| each deleteSelfAndSubordinates]].
then I can easily extend this to deal with additional inspector windows,
instead of having code in the model to search for them.
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191224/6f6db5eb/attachment.html>
More information about the Squeak-dev
mailing list
|