[Pharo-project] handlerForBlueButtonDown: anEvent

stephane ducasse stephane.ducasse at free.fr
Wed Feb 9 18:07:58 CET 2011


I was wondering if "anEvent handler ifNil:[^self]." should not be uncommented in. Now if it works like that this is better since it means that 
are not hanging around with a nil.


handlerForBlueButtonDown: anEvent
	"Return the (prospective) handler for a mouse down event. The handler is temporarily installed and can be used for morphs further down the hierarchy to negotiate whether the inner or the outer morph should finally handle the event.
	Note: Halos handle blue button events themselves so we will only be asked if there is currently no halo on top of us.
	Check whtehr halods are enabled (for deployment)."
	self wantsHaloFromClick ifFalse:[^nil].
	"anEvent handler ifNil:[^self]."
	(anEvent shiftPressed)
		ifFalse:[^nil] "let outer guy have it"
		ifTrue:[^self] "let me have it"

More information about the Pharo-project mailing list