<div dir="ltr"><div>I answered a little fast. This should work:</div><div>acceptDroppingMorph: morphToDrop event: evt<br> (morphToDrop isKindOf: TextMorph) ifFalse: [<br> ^Project current world acceptDroppingMorph: morphToDrop event: evt].<br> ^super acceptDroppingMorph: morphToDrop event: evt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 15, 2020 at 3:57 PM karl ramberg <<a href="mailto:karlramberg@gmail.com">karlramberg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>
<font size="-1">Try this<b><br></b></font></div><div><font size="-1"><b>PasteUpMorphXX>>acceptDroppingMorph:
morphToDrop event: evt</b></font><br>
<font size="-1"> (morphToDrop isKindOf: TextMorphXX) ifFalse: [</font><br>
<font size="-1"> ^morphToDrop rejectDropMorphEvent: evt].</font>
</div><div> super acceptDroppingMorph: aPiece event: evt.</div><div><br></div><div>Best,</div><div>Karl</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 15, 2020 at 3:47 PM Trygve Reenskaug <<a href="mailto:trygver@ifi.uio.no" target="_blank">trygver@ifi.uio.no</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Not quite. Joe now throws the the strange Morph back to where it
came from instead of ignoring it.<br>
I need Joe to accept all TexMorphXX but ignore the rest.<br>
<blockquote><font size="-1"><b>PasteUpMorphXX>>acceptDroppingMorph:
morphToDrop event: evt</b></font><br>
<font size="-1"> (morphToDrop isKindOf: TextMorphXX) ifFalse: [</font><br>
<font size="-1"> ^morphToDrop rejectDropMorphEvent: evt].</font><br>
</blockquote>
<br>
<br>
<br>
<div>On 2020.06.15 15:13, karl ramberg
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,</div>
<div>When you open a morph for dropping it will accept all
dropped morphs:</div>
<div>
<font size="-1">joe dropEnabled: true.</font></div>
<div><font size="-1"><br>
</font></div>
<div><font size="-1">To filter what is accepted you must
override acceptDroppingMorph: aMorph event: evt
</font></div>
<div>Look at implementors for that method.</div>
<div><br>
</div>
<div>Best,</div>
<div>Karl</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jun 15, 2020 at 2:44
PM Trygve Reenskaug <<a href="mailto:trygver@ifi.uio.no" target="_blank">trygver@ifi.uio.no</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Hi Squeakers,<br>
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:<br>
<br>
<img src="cid:172b8440f4798c9f8751" alt="" width="426" height="232"><br>
SRE has worked for years, last in 'Squeak3.10.2'. In
'Squeak5.3', the same program went into an infinite loop. It
transpired that <i>myClass>>processEvent: anEvent
using: defaultDispatcher</i> 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 <i>MorphicEventDispatcher
</i>has 4 methods. In 5,3, it has 16.<br>
<br>
Here's the beginning of my challenges with 5.3: I find two
anomalies in a diagram with just one symbol:<br>
<ol>
<li> 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.</li>
<li> The cursor becomes a text cursor when I move the
mouse across a symbol.</li>
</ol>
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. <br>
<blockquote><font size="-1">joe := PasteUpMorph new color:
Color lightBlue.<br>
joe bounds: (500@400 corner: 800@600).<br>
joe dropEnabled: true.<br>
joe openInWorld.<br>
circle := CircleMorph new.<br>
joe addMorphCentered: circle.<br>
tex := TextMorphXX new<br>
contents: 'XXX';<br>
borderWidth: 1;<br>
color: Color red;<br>
extent: 100@100.<br>
tex openInHand.</font><br>
</blockquote>
There is only one method in class TextMorphXX (sco
TextMorph):<br>
<blockquote><font size="-1">processEvent: anEvent using:
defaultDispatcher<br>
^#rejected</font><br>
</blockquote>
<img src="cid:172b8440f48e3c5bdb12" alt="" width="329" height="266"><br>
<br>
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.<br>
--Trygve<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div>-- <br>
<div>
<p class="MsoNormal"><i><span lang="EN-US">The essence
of object orientation is that objects <span>collaborate<span>
</span>to</span> achieve a goal. </span></i><span lang="EN-US"><br>
<span>Trygve</span> <span>Reenskaug</span> </span><span><a href="mailto:%20trygver@ifi.uio.no" target="_blank"><span lang="EN-US">mailto: trygver@ifi.uio.no</span></a></span><span lang="EN-US"><br>
<span>Morgedalsvn</span>. 5A </span><span style="font-size:10pt"><a href="http://folk.uio.no/trygver/" target="_blank"><span lang="EN-US">http://folk.uio.no/trygver/</span></a></span><span lang="EN-US"><br>
N-0378 Oslo </span><span><a href="http://fullOO.info" target="_blank"><span lang="EN-US">http://fullOO.info</span></a></span><span lang="EN-US"><br>
Norway Tel: (+47) 468 58 625 </span><span style="font-size:10pt" lang="EN-US"></span></p>
</div>
</div>
</div>
<br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre></pre>
</blockquote>
<br>
<div>-- <br>
<div>
<p class="MsoNormal"><i><span lang="EN-US">The essence of object orientation is
that objects <span>collaborate<span> </span>to</span> achieve a
goal. </span></i><span lang="EN-US"><br>
<span>Trygve</span> <span>Reenskaug</span> </span><span><a href="mailto:%20trygver@ifi.uio.no" target="_blank"><span lang="EN-US">mailto: trygver@ifi.uio.no</span></a></span><span lang="EN-US"><br>
<span>Morgedalsvn</span>.
5A </span><span style="font-size:10pt"><a href="http://folk.uio.no/trygver/" target="_blank"><span lang="EN-US">http://folk.uio.no/trygver/</span></a></span><span lang="EN-US"><br>
N-0378
Oslo </span><span><a href="http://fullOO.info" target="_blank"><span lang="EN-US">http://fullOO.info</span></a></span><span lang="EN-US"><br>
Norway Tel:
(+47) 468 58 625 </span><span style="font-size:10pt" lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
</div>
</blockquote></div>
</blockquote></div>