[squeak-dev] The Inbox: Morphic-ct.1666.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 6 12:20:48 UTC 2020


Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/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!



More information about the Squeak-dev mailing list