[squeak-dev] ProvideAnswerNotification and UIManager

Rein, Patrick Patrick.Rein at hpi.de
Tue Jul 10 09:28:14 UTC 2018


Hi everyone,

recently I noticed that the method BlockClosure>>valueSupplyingAnswer: (and related ones) do 
not work on all method of UIManager. When I looked into the issue I noticed that the signaling of
ProvideAnswerNotification is not done in the UIManagers but in the classes implementing the 
actual user interfaces for the corresponding queries (e.g. MenuMorph and PopUpMenu). This 
scattered the ProvideAnswerNotification logic throughout different packages and classes and 
might have lead to the oversights.

The attached changeset is a refactoring of this mechanism which moves the corresponding
logic into the UIManagers. Unfortunately, this required some code duplication but at least it is
contained with the UIManager. On the plus side the code is contained in the UIManagers and
all methods should be covered now.

As I am not very familiar with the original intend and responsibilities of the UIManagers I wanted
to ask whether anyone has any thoughts on that change.

Thanks and bests
Patrick

P.S.: There are other minor changes related to the refactoring in the changeset such as extending 
the BlockClosureTests to test all UIManager subclasses
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ProvideAnswerNotification.1.cs
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180710/327e5634/attachment.ksh>


More information about the Squeak-dev mailing list