Yellow Button and Morphic

Dan Ingalls DanI at wdi.disney.com
Fri May 29 18:25:01 UTC 1998


>I'd gotten tired of having to hit the little button at the top of the
>scroll-bar in order to bring up menus for the SystemWindows in Morphic.
>I thought I'd try to make the menus work with the "yellow" mouse button,
>as they do in MVC. After browsing related senders and implementors for a
>while, I realized that I was getting thoroughly lost. I can't seem to
>see the forest for the trees.
>
>Where should I be looking to get a perspective on how input events,
>particularly the mouse, are handled with Morphic?

I did all this as part of the update: '061MorphicPaneMenus-di.

>One thing that I noticed: it looks like any mouse button will act like
>the "yellow" one if the "Option" key is pressed. Trouble is, I don't
>have an option key. As I recall, that's something that's on the Mac?
>Does the Mac still sport a single button mouse? Sorry, I'm culturally
>deprived ;-)

Unfortunately I was confused about how we work the Mac option key and the "yellow" button.
Here is a QUICK FIX, that we will issue later as an update with probably some changes that make it clear that optionKey can only be tested on the Mac.

!PluggableListMorph methodsFor: 'events' stamp: 'di 5/29/1998 11:13'!
mouseDown: event onItem: aMorph
	event yellowButtonPressed ifTrue:
		[event shiftPressed ifTrue: [^ self shiftedYellowButtonActivity]
					ifFalse: [^ self yellowButtonActivity]].
	model okToChange ifFalse: [^ self].  "No change if model is locked"
	((autoDeselect == nil or: [autoDeselect]) and: [aMorph == selectedMorph])
		ifTrue: [self setSelectedMorph: nil]
		ifFalse: [self setSelectedMorph: aMorph]! !


!TextMorphForEditView methodsFor: 'all' stamp: 'di 5/29/1998 11:14'!
mouseDown: event
	event yellowButtonPressed ifTrue:
		[event shiftPressed ifTrue: [^ editView shiftedYellowButtonActivity]
						ifFalse: [^ editView yellowButtonActivity]].
	^ super mouseDown: event! !





More information about the Squeak-dev mailing list