<html>
<body>
<font size=3>Excellent!<br>
Many thanks<br>
--Trygve<br><br>
<br>
At 16.08.2004 15:26, you wrote:<br>
</font><blockquote type=cite class=cite cite><font face="arial" size=2>Hi
Trygve, </font><font size=3><br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; </font><font face="arial" size=2>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. </font><font size=3><br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; </font><font face="arial" size=2>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. </font><font size=3><br>
&nbsp;<br>
</font><font face="arial" size=2>&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.</font><font size=3><br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp; </font><font face="arial" size=2>Inside Diagram what
we have is:</font><font size=3><br>
&nbsp;<br>
- a TwoWayScrollablePanel<br>
</font><font face="arial" size=2>- a
TransformMorph</font><font size=3><br>
</font><font face="arial" size=2>- an
HJPasteUpMorph</font><font size=3><br>
&nbsp;<br>
</font><font face="arial" size=2>&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'). </font><font size=3><br>
&nbsp;<br>
</font><font face="arial" size=2>&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.</font><font size=3><br>
&nbsp;<br>
</font><font face="arial" size=2>Hope it helps.</font><font size=3><br>
&nbsp;<br>
</font><font face="arial" size=2>Regards,</font><font size=3><br>
</font><font face="arial" size=2>Hernán</font><font size=3><br>
&nbsp;<br>
</font>
<dl>
<dd><font face="tahoma" size=2>-----Original Message-----<br>

<dd>From:</b> 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 </b>Trygve Reenskaug<br>

<dd>Sent:</b> Monday, August 16, 2004 2:23 PM<br>

<dd>To:</b> The general-purpose Squeak developers list<br>

<dd>Subject:</b> RE: Widow activation<br><br>
</font>
<dd><font size=3>Hernán,<br>

<dd>Many thanks for your quick reply.<br><br>

<dd>The problem was that TwoWayScrollPane&gt;&gt;handlesMouseDown:
returned true and the event did not reach up to the SystemWindow.<br>

<dd>Changing it to false solved the problem.<br><br>

<dd>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>

<dd>a SystemWindow<br>

<dd>a Morph (Morph default)<br>

<dd>a Diagram (handlesMouseDown: returns evt yellowButtonPressed, i.e.,
false)<br>

<dd>a TwoWayScrollPane (handlesMouseDown: returns true)<br>

<dd>a TransformMorph (Morph default)<br>

<dd>a HJPasteUpMorph (handlesMouseDown: returns true)<br><br>

<dd>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>

<dd>Problem resolved. Many thanks for putting me on the right track<br>

<dd>--Trygve<br><br>

<dd>-----------------------------------------------<br>

<dd>At 16.08.2004 11:34, Hernán wrote:<br><br>
<blockquote type=cite class=cite cite>
<dd>Hi Trygve, <br>

<dd><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><br>

<dd><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>You
should check DiagramBrowser. In there I have the same<br>

<dd>structure than you (SystemWindow, TwoWayScrollPane and PasteUpMorph)
but<br>

<dd>without the problem you are describing.<br>
<br>

<dd><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>How
are you handling the events? With #on:send:to: or overriding<br>

<dd>#handlesMouseDown: and #mouseDown: ? Because If you return false
in<br>

<dd>#handlesMouseDown: I am pretty sure that the event should reach
the<br>

<dd>SystemWindow and get it activated.<br><br>

<dd><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>BTW,
you can always from the event handler send the #activate<br>

<dd>message to the SystemWindow yourself.<br><br>

<dd>&gt; -----Original Message-----<br>

<dd>&gt; From: Trygve<br>

<dd>&gt; <br>

<dd>&gt; I have a SystemWindow<br>

<dd>&gt;&nbsp;&nbsp;&nbsp; containing a TwoWayScrollPane<br>

<dd>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; containing a PasteUpMorph<br>

<dd>&gt; <br>

<dd>&gt; The window is activated (moved to the top) if I click the <br>

<dd>&gt; SystemWindow header.<br>

<dd>&gt; It is not activated if I click in a visible corner of the <br>

<dd>&gt; PasteUpMorph.<br>

<dd>&gt; <br>

<dd>&gt; I have tried making the PasteUpMorph keep the event <br>

<dd>&gt; WasHandeled at =false,<br>

<dd>&gt; but it doesn't help.<br>

<dd>&gt; <br>

<dd>&gt; Any ideas?<br>

<dd>&gt; Cheers<br>

<dd>&gt; --Trygve</blockquote><br>

<dd>-- <br><br>

<dd>Trygve Reenskaug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mailto: trygver
&lt;at&gt; ifi.uio.no<br>

<dd>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>

<dd>N-0378
Oslo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tel:
(+47) 22 49 57 27<br>

<dd>Norway<br>
</blockquote>
</dl><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>