Yellow Button and Morphic
William O. Dargel
wDargel at shoshana.com
Fri May 29 22:43:23 UTC 1998
Dan Ingalls wrote:
> 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
> !TextMorphForEditView methodsFor: 'all' stamp: 'di 5/29/1998 11:14'!
> mouseDown: event
These allow the menu to pop up with the yellow mouse button, but I found
two further problems that keep it from working.
The first was getting 'does not understand' from the PluggableListView
for messages that should have gone ot the Browser. The following is my
correction for that:
'From Squeak 2.0 of May 22, 1998 on 29 May 1998 at 6:13:54 pm'!
!StringHolder methodsFor: 'code pane menu' stamp: 'wod 5/29/1998 16:35'!
perform: selector orSendTo: otherTarget
"Selector was just chosen from a menu by a user. If can respond, then
perform it on myself. If not, send it to otherTarget, presumably the
editPane from which the menu was invoked."
(self respondsTo: selector)
ifTrue: [^ self perform: selector]
ifFalse: [^ otherTarget perform: selector]! !
The second problem manifests itself as this: When selecting an item from
the menu by releasing the yellow button, sometimes it is acted upon and
sometimes it is ignored. This seems to be quasi-random. Certain list
menus seem to work all the time, some seem never to work and the Browser
text pane seems to work/not work at random.
What I've managed to track down is this:
is ignoring the event because
mouseInMe := self bounds containsPoint: evt cursorPoint.
is evaluating to false. When this is working (like from the scroll-bar
menu button), both 'bounds' and 'cursorPoint' are in display
coordinates. The event "evt" is passed in from
oldFocus mouseUp: (self transformEvent: evt)
The problem comes from the 'eventTransform' of the HandMorph. In the
case I investigated, the transform has negative offset equal to the
display coordinates of the PluggableListMorph's origin.
Why this is so, or how to fix it, has me baffled. Any Morpher out there
with an easy answer?
Bill Dargel wdargel at shoshana.com
100 West Joy Road, Ann Arbor, MI 48105 USA
More information about the Squeak-dev