The figures were missing when this message reached me. I resend
itwith the figures attached.
------------------------------------- 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: 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:
joe := PasteUpMorph new color: Color lightBlue.There is only one method in class TextMorphXX (sco TextMorph): processEvent: anEvent using: defaultDispatcher 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. 1: SRE Context Browser [3072DemoEllipseSRE Step mechanism.1.gif (11K) Download Attachment 2: SRE anomaly example.png (56K) Download Attachment |
On 15/06/20 6:55 pm, Trygve Reenskaug wrote:
> joe := PasteUpMorph new color: Color lightBlue. > joe bounds: (500@400 corner: 800@600). > joe dropEnabled: true. ... > 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. PasteUpMorph is designed to grab morphs. It overrides mouseDown: method in Morph to try and grab whatever morph is dropped into it (unless it is in PartsBin). You could use RectangleMorph or BorderedMorph to avoid grabbing. HTH .. Subbu |
In reply to this post by Trygve
Hi,
The example illustrates 2 problems:
1.
The playfield grabs the Workspace when
it is
positioned within it, but the playfield should have ignored it.
PasteUpMorphXX>>wantsDroppedMorph: aMorph event: evt 2.
The TextMorphXX grabs the cursor,
making it
into a Text cursor. That's all. The small script works as specified, and it is time to revert to porting SRE. This is a prerequisite for porting Loke, a personal computer for laypeople living in the connected society. Their computer shall be equally available on their several devices. A proof-of-concept Loke exists in 'Squeak3.10.2' as a non-intrusive program. I want to make it generally available in a modern Squeak for people to play with.
Thanks for your help --Trygve
Note: When dpsTrace:levels: was executed, the stack depth was 47. (I have attached it for your enjoyment). I thought I understood the principle of event handling: The Hand picks up a sensor event and passes it to the top-level morph. From there, it is passed down the submorphs until it is handled. In this case, the path is: World-aPasteUpMorphXX-aTextMorhXXX. Yet, the Morphic event handling manages to create a stack with a depth of 47 before it asks if it may drop a morph. Not easy to grok, IMO. This open-access
article describes Loke http://folk.uio.no/trygver/2005/babyuml/tweakComponents.pdf On 2020.06.15 15:25, Trygve Reenskaug
wrote:
The figures were missing when this message reached me. I resend itwith the figures attached. --
The essence of object orientation is
that objects collaborate to achieve a
goal. |
Free forum by Nabble | Edit this page |