I argue that this fix is wrong, giving the morph logic to the Editor instead of the View ( the morph).
this conceptual problem, leads to having to ask for the Global ActiveEvent in the Editor>>offerMenuFromEsc:.
If you take a look at the already present method, which should be the one to be used.
Editor>>escapePressed
"The message is sent when the user hits esc"
self announceEscape
Which allows the Morph to take care of the view related behavior.
So i propose reverting to this behavior:
Editor>>escapePressed
self morph escapePressed .
^ false
Then adding
TextMorph>>escapePressed
self yellowButtonActivity: false.
TextMorphForEditView>>escapePressed
self editView yellowButtonActivity: false .
Given that TextMorphForEditView is the only implementor of #editView, and following the logic in
TextEditor>>raiseContextMenu:
TextEditor>>offerMenuFromEsc: aKeyboardEvent
The attached change set implements the fixes.
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project