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. |
Hi, When you open a morph for dropping it will accept all dropped morphs:
joe dropEnabled: true. To filter what is accepted you must override
acceptDroppingMorph: aMorph event: evt
Look at implementors for that method. Best, Karl On Mon, Jun 15, 2020 at 2:44 PM Trygve Reenskaug <[hidden email]> wrote:
|
Not quite. Joe now throws the the strange Morph back to where it
came from instead of ignoring it.
I need Joe to accept all TexMorphXX but ignore the rest. PasteUpMorphXX>>acceptDroppingMorph: morphToDrop event: evt On 2020.06.15 15:13, karl ramberg
wrote:
--
The essence of object orientation is
that objects collaborate to achieve a
goal. |
Try this PasteUpMorphXX>>acceptDroppingMorph:
morphToDrop event: evt (morphToDrop isKindOf: TextMorphXX) ifFalse: [ ^morphToDrop rejectDropMorphEvent: evt]. super acceptDroppingMorph: aPiece event: evt. Best, Karl On Mon, Jun 15, 2020 at 3:47 PM Trygve Reenskaug <[hidden email]> wrote:
|
I answered a little fast. This should work: acceptDroppingMorph: morphToDrop event: evt (morphToDrop isKindOf: TextMorph) ifFalse: [ ^Project current world acceptDroppingMorph: morphToDrop event: evt]. ^super acceptDroppingMorph: morphToDrop event: evt On Mon, Jun 15, 2020 at 3:57 PM karl ramberg <[hidden email]> wrote:
|
In reply to this post by Trygve
As for the TextMorphXX. Do you want the TextMorphXX to behave like a StringMorph, eg. editing will not activate on mouse over/ move events ? tex := StringMorph new contents: 'XXX'; borderWidth: 1; color: Color red; extent: 100@100. tex openInHand. On Mon, Jun 15, 2020 at 2:44 PM Trygve Reenskaug <[hidden email]> wrote:
|
In reply to this post by Trygve
On 15/06/20 7:17 pm, Trygve Reenskaug wrote:
> Not quite. Joe now throws the the strange Morph back to where it came > from instead of ignoring it. This will happen if dropEnabled is false. > I need Joe to accept all TexMorphXX but ignore the rest I think this is handled by wantsDroppedMorph... method. PasteUpMorphXX>>wantsDroppedMorph: aMorph event: evt (aMorph isKindOf: TextMorphXX) ifFalse: [^false] ^super wantsDroppedMorph: aMorph event: evt HTH .. Subbu |
In reply to this post by Trygve
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
|
Hi Stephen,
On Mon, Jun 15, 2020 at 10:08:27AM -0700, stephen--- via Cuis-dev wrote: > > 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 > Just in case you may be overlooking it, MVC is alive and well in Squeak 5.3. world menu -> open... -> mvc project It may be in need of fixes and improvements, and if so there are several people on the Squeak list (including me) who will be interested in helping. It would be cool to see MVC in Cuis too. I think that Juan was recently talking about re-implementing Squeak projects in Cuis, so that might make it quite feasible. The Squeak implementation of MVC may be carrying along some accumulated baggage, so I'm not sure if it would be a suitable starting point for Cuis. Dave |
In reply to this post by Karl Ramberg
This method is not called when I execute the script.
On 2020.06.15 15:57, karl ramberg
wrote:
--
The essence of object orientation is
that objects collaborate to achieve a
goal. |
In reply to this post by Stephen Pope
Not related to the topic, but since you asked what happened during the
years, I guessed I could mention that a framework for music composition has been developed in Squeak: http://www.zogotounga.net/comp/squeak/sqgeo.htm Best, Stef |
In reply to this post by Trygve
Sorry. My mistake. It WAS called.
On 2020.06.16 10:09, Trygve Reenskaug
wrote:
This method is not called when I execute the script. --
The essence of object orientation is
that objects collaborate to achieve a
goal. |
Free forum by Nabble | Edit this page |