[squeak-dev] The Trunk: Morphic-nice.1989.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 6 14:49:59 UTC 2022

Nicolas Cellier uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-nice.1989
Author: nice
Time: 6 May 2022, 4:49:51.184501 pm
UUID: 1e4a16d9-8bdc-c04f-9e62-a08df254d7bc
Ancestors: Morphic-ct.1988

Make a block cleaner in dispatchMouseDown:with:

=============== Diff against Morphic-ct.1988 ===============

Item was changed:
  ----- Method: MorphicEventDispatcher>>dispatchMouseDown:with: (in category 'specific') -----
  dispatchMouseDown: anEvent with: aMorph
  	"Find the appropriate receiver for the event and let it handle it. When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is."
  	| handler lastHandler |
  	"Try to get out quickly"
  	anEvent wasIgnored ifTrue: [^anEvent "propagate the ignored event"].
  	(aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected].
  	"In case the mouse wasn't even in the receiver"
  	lastHandler := anEvent handler. 
  	"Negotiate and install the actual handler."
  	handler := aMorph handlerForMouseDown: anEvent.
  	handler ifNotNil: [anEvent handler: handler].
+ 	^[ self
- 	[^ self
  		dispatchEvent: anEvent
  		withHandler: handler
  		withMorph: aMorph
  	] ensure: [
  		anEvent handler: lastHandler. "good style"].!

More information about the Squeak-dev mailing list