[squeak-dev] [BUG] Updating TheWorldMainDockingBar leaves dangling results widgets
Christoph.Thiede at student.hpi.uni-potsdam.de
Wed Jan 22 08:55:27 UTC 2020
Steps to reproduce:
Go to the SearchBar of TWMDB (TheWorldMainDockingBar) and print something.
Update TWMBB, for example by applying a UI theme.
In the SearchBar, print another thing.
There is still one results widget displaying the result of your latest expression.
The first results widget keeps open and will be never closed.
SearchBar, which is a model, stores the results widget, which is a morph. Via #removeResultsWidget, the latter is removed if a new expression is printed.
But in TWMDB>>#searchBarOn:, which is called by #updatedIfNeeded:, each time a new SearchBar is created and built. This SearchBar is not referenced by TWMDB or the DockingBarMorph, but only as the model of the PluggableTextMorphPlus for the search bar. This text morph, in turn, is deleted by #updateIfNeeded: per "aDockingBar removeAllMorphs". But as the text morph is directly composed into the world, it is not affected by that deletion.
a. Store the SearchBar model instance in TWMDB? Contra: TWMDB should keep able to work with an arbitrary number of docking bar morphs.
b. Store the SearchBar model instance in DockingBarMorph? Contra: handling the search rather seems a responsibility of TWMDB.
I am a bit confused about the current design ...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev