When you press the Esc button in an MVC workspace, you get a walkback 'offerMenuFromEsc: not understand'. In Morphic, the context menu is offered when the Esc button is presssed. This change set adds the same feature for MVC. (I simply added the missing method to the instance protocol of ParagraphEditor.)
Until now, the method was only implemented in TextMorphEditor, a direct subclass of ParagraphEditor. The method selector #offerMenuFromEsc: is registered in the class variable CmdActions of ParagraphEditor as handler for the Esc character. Earlier versions had the following handlers for Esc: (see versions of ParagraphEditor class>>initializeCmdKeyShortcuts)
#selectCurrentTypeIn: (sma 12/15/1999) #escapeToDesktop: (di 12/3/2001) #raiseContextMenu: (dvf 12/7/2001) #offerMenuFromEsc: (sw 12/7/2001)
All these are defined in ParagraphEditor.
I should add that there are two ways to describe the bug: 1. A method that is registered in CmdActions was not implemented. My proposed fix is based on this description. 2. Class TextMorphEditor needs a handler for Esc that is not needed in the superclass, but the handler was erroneously registered in a class variable of the superclass. This error description implies that TextMorphEditor should have a collection of its own to register handlers for special characters.
What is the preferred bug description? Opinions are welcome!
Grretings, Boris
squeak-dev@lists.squeakfoundation.org