The Trunk: Morphic-ct.1666.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-ct.1666.mcz

commits-2
Chris Cunningham uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1666.mcz

==================== Summary ====================

Name: Morphic-ct.1666
Author: ct
Time: 6 June 2020, 2:20:38.028259 pm
UUID: 8476dcc1-0e3b-cd44-98bd-997fd6ead0fe
Ancestors: Morphic-cbc.1664

Another proposal for dealing with keyboard focus in diaog windows: Introduce #needsClickToFocus property. If enabled, message body must be clicked before key events go to the text morph instead of the dialog window.

Very kindly protest against Morphic-cbc.1665 (inbox) which would forbid any possible useful keyboard interaction with the message text, for example <cmd>a or <cmd>c. :-)

=============== Diff against Morphic-cbc.1664 ===============

Item was changed:
  ----- Method: DialogWindow>>createMessage: (in category 'initialization') -----
  createMessage: aString
 
  messageMorph := aString asText asMorph.
  messageMorph
  name: 'Message';
  readOnly: true;
  setProperty: #indicateKeyboardFocus toValue: #never;
+ setProperty: #needsClickToFocus toValue: true.
- lock.
  self setMessageParameters.
  ^ messageMorph!

Item was changed:
  ----- Method: TextMorph>>handlesKeyboard: (in category 'event handling') -----
+ handlesKeyboard: anEvent
+
+ ^ ((self valueOfProperty: #needsClickToFocus ifAbsent: [false]) ==> [
+ anEvent hand keyboardFocus = self])!
- handlesKeyboard: evt
- ^true!