[squeak-dev] Event handling challenges

stephen at heaveneverywhere.com stephen at heaveneverywhere.com
Mon Jun 15 17:08:27 UTC 2020


Hello all,

I’ve been working in Cuis and loving the reduced footprint, and Trygve’s note encourages me to ask whether there’s anyone who wants to contribute to a reimplementation of old-school MVC and an updated “wrapper” framework for GUI construction in Squeak/Cuis.

My application (Siren music tools) uses StandardSystemViews/Controllers, and so I’ve made file-ins that restore much of the View/Controller framework, but bottoming out to Morphs for the display objects.

Did I miss it in the years I was away? Has this been done before?

stp

--

                    Stephen Travis Pope   Santa Barbara, California, USA    
          http://HeavenEverywhere.com <http://heaveneverywhere.com/>        http://FASTLabInc.com <http://fastlabinc.com/>
                       https://vimeo.com/user19434036/videos <https://vimeo.com/user19434036/videos>      http://heaveneverywhere.com/Reflections

--



> On Jun 15, 2020, at 5:44 AM, Trygve Reenskaug <trygver at ifi.uio.no> wrote:
> 
> Hi Squeakers,
> My SRE context browser is a tool for drawing a snapshot of a selected structure of interlinked objects where each object is shown as a rectangular symbol. This diagram shows an object with its class and superclass objects:
> 
> <clfapgjkmegmpnfm.gif>
> SRE has worked for years, last in 'Squeak3.10.2'. In 'Squeak5.3', the same program went into an infinite loop. It transpired that myClass>>processEvent: anEvent using: defaultDispatcher had become a new thing called an event filter and needed to return an Event or a Symbol. That problem fixed; the program still misbehaves. The problem seems to be with event handling. I have never been into that corner of Smalltalk but have read some Squeak documentation. I have not found any concrete code.  I realize that I will never understand Squeak's event handling by reading code, code comments, and even the documentation I have found. There has apparently been a significant increase in complexity lately. An example: In 3,10,2, class MorphicEventDispatcher has 4 methods. In 5,3, it has 16.
> 
> Here's the beginning of my challenges with 5.3: I find two anomalies in a diagram with just one symbol:
>     When I move some other window to a position within the diagram, the diagram grabs it and makes it a submorph of itself.  In 3.10.2, the diagram ignores it.
>     The cursor becomes a text cursor when I move the mouse across a symbol.
> I have no explanation for either anomaly. My SRE code is a kludge and is almost unreadable. It is hard to formulate a question without the whole code as a background, and I have tried to reproduce them in a simple example. I managed to reproduce the first, but not the second anomaly. In a workspace, copy, select,  and do it. The XXX-symbol becomes attached to the cursor, and I place it in the blue background. 
> joe := PasteUpMorph new color: Color lightBlue.
> joe bounds: (500 at 400 corner: 800 at 600).
> joe dropEnabled: true.
> joe openInWorld.
> circle := CircleMorph new.
> joe addMorphCentered: circle.
> tex := TextMorphXX new
>         contents: 'XXX';
>         borderWidth: 1;
>         color: Color red;
>         extent: 100 at 100.
> tex openInHand.
> There is only one  method in class TextMorphXX (sco TextMorph):
> processEvent: anEvent using: defaultDispatcher
>     ^#rejected
> <ojfapckoaibeechh.png>
> 
> I move some background window,  actually a collapsed Monticello thing, to Joe's position, Joe grabs it and makes it into a submorph. Any hints about how to proceed will be greatly appreciated.
> --Trygve
> 
> -- 
> The essence of object orientation is that objects collaborate  to achieve a goal. 
> Trygve Reenskaug      mailto: trygver at ifi.uio.no <mailto:%20trygver at ifi.uio.no>
> Morgedalsvn. 5A       http://folk.uio.no/trygver/ <http://folk.uio.no/trygver/>
> N-0378 Oslo             http://fullOO.info <http://fulloo.info/>
> Norway                     Tel: (+47) 468 58 625 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200615/ba066d7d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 2442 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200615/ba066d7d/attachment.tiff>


More information about the Squeak-dev mailing list