<html>
<body>
<font size=3>Stef, Doug<br>
It seems that the ScrollPane in 3.7g-5983 would give me the same problem
since its handlesMouseDown: returns true. (I am running 'Squeak3.6 of 6
October 2003 update 5429). But the problem could well be that I am doing
something stupid somewhere else or that it is resolved in ScrollPane. I
will check when 3.7 is released. <br><br>
Cheers<br>
--Trygve<br><br>
(P.S.: I find the morphic input unbelievably obscure with its recursive
calls and callbacks. I cannot even see through window activation in my
simple three layers of <br>
&nbsp;&nbsp;&nbsp; (aSystemWindow -&gt; aTwoWayScrollPane
-&gt;aPasteUpMorph). <br>
Morph input is extremely powerful with its dragging and halos. But I
don't expect to understand it all for several months yet, if
ever.)<br><br>
<br>
At 17.08.2004 09:32, you wrote:<br>
<blockquote type=cite class=cite cite>Yes this would be
important.<br><br>
Stef<br>
On 17 aoűt 04, at 04:16, Doug Way wrote:<br><br>
<blockquote type=cite class=cite cite><br>
FYI, TwoWayScrollPane is now obsolete.&nbsp; ScrollPane now handles two
way scrolling if needed, so you should be able to use ScrollPane for
anything that TwoWayScrollPane used to do.&nbsp; Some of the code in
TwoWayScrollPane may be getting old and crufty, which may be a source of
your problems.&nbsp; See this earlier message:<br><br>
<a href="http://groups.yahoo.com/group/squeak/message/82850" eudora="autourl">http://groups.yahoo.com/group/squeak/message/82850</a><br><br>
At a minimum, we should add a note in the class comment for
TwoWayScrollPane that it's obsolete, and then perhaps deprecate any
instance creation methods.<br><br>
- Doug<br><br>
<br>
On Monday, August 16, 2004, at 02:26 PM, Hernan Tylim wrote:<br><br>
<blockquote type=cite class=cite cite>Hi Trygve,<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; It was a long time ago but I think the rationale was
this. The DiagramBrowser SystemWindow is composed of 3 panels. The two on
the left and the one on the right where the Diagrams appear.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; This last one isn't a Diagram but a simple Morph
acting as a container because if it wasn't in that way then the
SystemWindow would change the Diagram's color to match the one of the
window.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; Another reason in using SystemWindows in this way is
that I found it more convenient for adding and removing submorphs. Here
you just add and remove submorphs from the container and you forget about
the SystemWindow. Without the container you would have to be careful on
how you add and remove the morphs to not mest up the LayoutFrames and
resizeability (does exists that word?) of the SystemWindow panels.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; Inside Diagram what we have is:<br>
&nbsp;<br>
- a TwoWayScrollablePanel<br>
- a TransformMorph<br>
- an HJPasteUpMorph<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; To reduce one level of composition we could make
Diagram to be a subclass of TwoWayScrollablePane, but I did it in this
way because a Diagram do not only holds the TwoWayScrollablePane but also
an extra annotation panel which is not visible by default (right click on
the diagram and select: 'shows annotations panel').<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; The TransformMorph is part of the
TwoWayScrollablePanel so we cannot get rid of it. The last level is the
PasteUpMorph which holds the shapes, and thats it.&nbsp; Those were the
six level.<br>
&nbsp;<br>
Hope it helps.<br>
&nbsp;<br>
Regards,<br>
Hernán<br>
&nbsp;<br><br>
<br>
-----Original Message-----<br>
From: squeak-dev-bounces@lists.squeakfoundation.org
[<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" eudora="autourl">mailto:squeak-dev-bounces@lists.squeakfoundation.org</a>]
On Behalf Of Trygve Reenskaug<br>
Sent: Monday, August 16, 2004 2:23 PM<br>
To: The general-purpose Squeak developers list<br>
Subject: RE: Widow activation<br><br>
Hernán,<br>
Many thanks for your quick reply.<br><br>
The problem was that TwoWayScrollPane&gt;&gt;handlesMouseDown: returned
true and the event did not reach up to the SystemWindow.<br>
Changing it to false solved the problem.<br><br>
Jacaranda was my starting point for the present programs, but I have
tried to simplify the morph structure. Corresponding to my three levels,
I find 6 levels in Jacaranda:<br><br>
a SystemWindow<br>
a Morph (Morph default)<br>
a Diagram (handlesMouseDown: returns evt yellowButtonPressed, i.e.,
false)<br>
a TwoWayScrollPane (handlesMouseDown: returns true)<br>
a TransformMorph (Morph default)<br>
a HJPasteUpMorph (handlesMouseDown: returns true)<br><br>
I haven't quite penetrated the rationale behind the many layers in
Jacaranda, but it seems as if I could have introduced a dummy layer below
the SystemWindow for the purposes of returning false. My solution is to
use my own sco of TwoWayScollPane that returns true. This may be a hack
since I there may be a deep reason for ScrollPanes to return
true.<br><br>
Problem resolved. Many thanks for putting me on the right track<br>
--Trygve<br><br>
-----------------------------------------------<br>
At 16.08.2004 11:34, Hernán wrote:<br><br>
Hi Trygve,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You should check
DiagramBrowser. In there I have the same<br>
structure than you (SystemWindow, TwoWayScrollPane and PasteUpMorph)
but<br>
without the problem you are describing.<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; How are you handling the
events? With #on:send:to: or overriding<br>
#handlesMouseDown: and #mouseDown: ? Because If you return false in<br>
#handlesMouseDown: I am pretty sure that the event should reach the<br>
SystemWindow and get it activated.<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BTW, you can always from the
event handler send the #activate<br>
message to the SystemWindow yourself.<br><br>
&gt; -----Original Message-----<br>
&gt; From: Trygve<br>
&gt;<br>
&gt; I have a SystemWindow<br>
&gt;&nbsp;&nbsp;&nbsp; containing a TwoWayScrollPane<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; containing a PasteUpMorph<br>
&gt;<br>
&gt; The window is activated (moved to the top) if I click the<br>
&gt; SystemWindow header.<br>
&gt; It is not activated if I click in a visible corner of the<br>
&gt; PasteUpMorph.<br>
&gt;<br>
&gt; I have tried making the PasteUpMorph keep the event<br>
&gt; WasHandeled at =false,<br>
&gt; but it doesn't help.<br>
&gt;<br>
&gt; Any ideas?<br>
&gt; Cheers<br>
&gt; --Trygve<br><br>
<br><br>
<br>
--<br><br>
Trygve Reenskaug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mailto: trygver &lt;at&gt;
ifi.uio.no<br>
Morgedalsvn. 5A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://heim.ifi.uio.no/~trygver" eudora="autourl">http://heim.ifi.uio.no/~trygver</a><br>
N-0378 Oslo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Tel: (+47) 22 49 57 27<br>
Norway<br><br>
</blockquote></blockquote><br><br>
</blockquote><br>
<x-sigsep><p></x-sigsep>
-- <br><br>
Trygve Reenskaug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mailto: trygver &lt;at&gt;
ifi.uio.no<br>
Morgedalsvn. 5A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://heim.ifi.uio.no/~trygver" eudora="autourl">http://heim.ifi.uio.no/~trygver</a><br>
N-0378 Oslo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Tel: (+47) 22 49 57 27<br>
Norway<br>
</font></body>
<br>
</html>