The Trunk: Morphic-mt.780.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-mt.780.mcz

commits-2
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'!