[ENH] a DoitButtonMorph

David N. Smith (IBM) dnsmith at watson.ibm.com
Sat Nov 3 22:20:58 UTC 2001


Bob:

:-)

There is a "change when to act" menu item in the red halo menu that lets one select mouse down, mouse still down, mouse up, with mouse up as the default. This is just like in SimpleButtonMorph.

I tried not to get mixed up in that mess with 'add mouse up action', partly because of comments like:

Morph>>doButtonAction
	"If the receiver has a button-action defined, do it now.  The default button action of any morph is, well, to do nothing.  Note that there are several ways -- too many ways -- for morphs to have button-like actions.  This one refers not to the #mouseUpCodeToRun feature, nor does it refer to the Player-scripting mechanism.  Instead it is intended for morph classes whose very nature is to be buttons -- this method provides glue so that arbitrary buttons on the UI can be 'fired' programatticaly from user scripts"


Also, adding a mouseUpCodeToRun string causes the morph to get a large, ugly cloud around itself which is even more distracting when pressed upon.

There needs to be some cleanup and rethinking of mouse actions, I suspect, and I tried to make a morph which could later be fit to something better by mainly throwing away code. I hope.

I considered adding a way to delete menu items added by morphs higher in the tree, but I haven't done it yet; sometimes they do not apply to specialized versions of a morph.

Dave


At 21:48 -0500 11/2/01, Bob Arning wrote:
>On Fri, 2 Nov 2001 19:21:49 -0500 "David N. Smith (IBM)" <dnsmith at watson.ibm.com> wrote:
>>I'm open for suggestions, criticisms, or whatever. There may even be such a button somewhere (Transforming3DPressThingMorph or something) but I couldn't find one.
>
>Dave,
>
>One thing you could try it to add a mouseup action to the morph from the red halo menu.
>
>Cheers,
Bob
-- 
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
dnsmith at watson.ibm.com




More information about the Squeak-dev mailing list