Discussion:
[squeak-dev] ProvideAnswerNotification and UIManager
p***@hpi.uni-potsdam.de
2018-10-18 16:56:28 UTC
Permalink
Hi everyone,

some of you might remember that I proposed a changeset for refactoring the signaling and handling of ProvideAnswerNotification (ProvideAnswerNotification and UIManager ( http://forum.world.st/ProvideAnswerNotification-and-UIManager-td5081488.html) and original text below). David already looked at it briefly and I would like to merge the changes in the near future (before it gets lost), so I would like to ask for other opinions before adding it. :)

Bests
Patrick

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
["ProvideAnswerNotification.2.cs"]
David T. Lewis
2018-10-19 00:49:16 UTC
Permalink
+1 for moving it to trunk, and thanks for waiting until after the 5.2 release was done.

The changes load without problems in 5.2, work well, and they have good unit test coverage.

These updates let a UIManager be responsible for dispatching the user interface
requests, which is exactly the right thing to do. See class comment:

UIManager is a dispatcher for various user interface requests, such as
menu and dialog interactions. An instance of UIManager is associated with
each Project to implement the appropriate functions for Morphic, MVC or
other user interfaces.

Thanks,
Dave
Post by p***@hpi.uni-potsdam.de
Hi everyone,
some of you might remember that I proposed a changeset for refactoring the signaling and handling of ProvideAnswerNotification (ProvideAnswerNotification and UIManager ( http://forum.world.st/ProvideAnswerNotification-and-UIManager-td5081488.html) and original text below). David already looked at it briefly and I would like to merge the changes in the near future (before it gets lost), so I would like to ask for other opinions before adding it. :)
Bests
Patrick
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
Loading...