[squeak-dev] The Trunk: Morphic-ct.1501.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 5 12:36:54 UTC 2019


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

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

Name: Morphic-ct.1501
Author: ct
Time: 12 August 2019, 1:55:12.151463 pm
UUID: d33551bf-afdc-c94d-a872-00a881d17c7d
Ancestors: Morphic-ct.1500

Remove deprecated filter method from MenuMorph

We have #handleFiltering: instead of #filterListWith:.

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

Item was removed:
- ----- Method: MenuMorph>>filterListWith: (in category 'keyboard control') -----
- filterListWith: char 
- 	| matchString |
- 	matchString := self valueOfProperty: #matchString ifAbsentPut: [String new].
- 	matchString := char = Character backspace 
- 				ifTrue: 
- 					[matchString isEmpty ifTrue: [matchString] ifFalse: [matchString allButLast]]
- 				ifFalse: [matchString copyWith: char].
- 	self setProperty: #matchString toValue: matchString!

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!



More information about the Squeak-dev mailing list