[squeak-dev] Morph wants to know when it loses focus

Chris Muller asqueaker at gmail.com
Wed Feb 12 16:18:14 UTC 2014


Keep track of your morphs.

In Maui, you can have multiple views of the same identical object on
the screen at once.  Whenever you hover any one of them, all views of
that same object on the screen are highlighted.  When the mouse stops
hovering over it, all views are unhighlighted.

I accomplished this by having a MauiWorld with a collection of
'players' in that world.

Not sure if this is analogous to your need, but it works.

On Tue, Feb 11, 2014 at 5:55 PM, tim Rowledge <tim at rowledge.org> wrote:
>
> On 11-02-2014, at 4:45 PM, Jecel Assumpcao Jr. <jecel at merlintec.com> wrote:
>
>> Bert Freudenberg wrote:
>>> On 11.02.2014, at 22:21, Tim Rowledge wrote:
>>>> On 11-02-2014, at 12:50 PM, Bert Freudenberg wrote:
>>>>> Your morph should be sent keyboardFocusChange: false when it loses focus.
>>>>
>>>> Unfortunately that is only for something that got keyboard focus. I thought that
>>>> newMouseFocus: ought to be it but despite comments claiming to release the
>>>> mouse focus it only seems to be internal to the HandMorph; nothing seems to
>>>> go to the old focus morph.
>>>
>>> Yep.
>>
>> So would having the morph return true to #handlesMouseOver: enough to
>> make it receive #mouseLeave: events? We really need some kind of event
>> debugger to see what is going on because there are too many interacting
>> parts.
>
> Tried that; it is sent too late in the process to catch what I need. For my needs here mouseLeave isn’t appropriate since you want to be able to enter and leave the morph and even mouseDown on it in order to do something like a HaloMorph does. It’s only if you mouseDown on some other morph that I want it to go away.
>
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Real Daleks don't climb stairs - they level the building. <Re-no-vaaate><Re-no-vaaate!>
>
>
>


More information about the Squeak-dev mailing list