The Trunk: Morphic-ct.1500.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.1500.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1500.mcz

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

Name: Morphic-ct.1500
Author: ct
Time: 10 August 2019, 1:43:30.153412 am
UUID: 3c117318-6d64-f14e-b166-ebee4ed792f7
Ancestors: Morphic-mt.1498

Refactor menu filtering to ignore special keys like Character end

=============== Diff against Morphic-mt.1498 ===============

Item was changed:
  ----- Method: MenuMorph>>handleFiltering: (in category 'keystroke helpers') -----
  handleFiltering: evt
 
  | matchString |
  matchString := self valueOfProperty: #matchString ifAbsentPut: [ String new ].
+ matchString := true
+ caseOf: {
+ [ evt keyCharacter = Character backspace ] ->
+ [ matchString isEmpty
+ ifTrue: [ matchString ]
+ ifFalse: [ matchString allButLast ] ].
+ [ evt keyValue >= 32 ] ->
+ [ matchString , evt keyCharacter ] }
+ otherwise: [ matchString ].
- matchString := evt keyValue = 8 " Character backspace asciiValue "
- ifTrue: [
- matchString isEmpty
- ifTrue: [ matchString ]
- ifFalse: [ matchString allButLast ] ]
- ifFalse: [
- matchString copyWith: evt keyCharacter ].
  self setProperty: #matchString toValue: matchString.
  self displayFiltered: evt!