[squeak-dev] The Trunk: Morphic-mt.780.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 13 16:46:37 UTC 2015


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

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

Name: Morphic-mt.780
Author: mt
Time: 13 March 2015, 9:46:07.469 am
UUID: f9279251-e8ab-8248-9c2f-1c47cce7e701
Ancestors: Morphic-mt.779

Keystrokes in tree morphs: Possibility to get access to event (and pressed modifiers) in the model.

=============== Diff against Morphic-mt.779 ===============

Item was changed:
  ----- Method: SimpleHierarchicalListMorph>>keyStrokeAction: (in category 'event handling') -----
  keyStrokeAction: event 
  
+ 	| numArgs |
  	keystrokeActionSelector ifNil: [^false].
  	
+ 	numArgs := keystrokeActionSelector numArgs.
+ 	
+ 	numArgs = 1 ifTrue: [
+ 		^ model
+ 			perform: keystrokeActionSelector
+ 			with: event keyCharacter].
+ 	numArgs = 2 ifTrue: [
+ 		^ model 
+ 			perform: keystrokeActionSelector
+ 			with: event keyCharacter
+ 			with: self].
+ 	numArgs = 3 ifTrue: [
+ 		^ model 
+ 			perform: keystrokeActionSelector
+ 			with: event keyCharacter
+ 			with: self
+ 			with: event].
+ 	^self error: 'The keystrokeActionSelector must be a 1-, 2-, or 3-keyword symbol'!
- 	keystrokeActionSelector numArgs = 1 
- 		ifTrue: 
- 			[^model
- 				perform: keystrokeActionSelector
- 				with: event keyCharacter].
- 	keystrokeActionSelector numArgs = 2 
- 		ifTrue: 
- 			[^model 
- 				perform: keystrokeActionSelector
- 				with: event keyCharacter
- 				with: self].
- 	^self error: 'The keystrokeActionSelector must be a 1- or 2-keyword symbol'!



More information about the Squeak-dev mailing list