<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Georgia">compare the difference in these two:<br>
      <br>
      Morph new openInWorld;<br>
          color: Color red;<br>
          position: 20@100;<br>
          on: #mouseDown<br>
          send: #value<br>
          to: [(r _ RectangleMorph new extent: 500@500)<br>
          openInHand;<br>
          position: r center].<br>
      <br>
      Morph new openInWorld;<br>
          color: Color green;<br>
          position: 20@200;<br>
          on: #mouseUp<br>
          send: #value<br>
          to: [(r _ RectangleMorph new extent: 500@500)<br>
          openInHand;<br>
          position: r center].<br>
      <br>
      If you want to keep the big rectangle in hand, the red button
      requires you hold the mouse button continuously. The green button
      retains the big rectangle until you click. HandMorph simply waits
      for the next mouse up or down to drop the morphs it's holding.<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
      <br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 5/29/13 10:21 PM, Chris Muller
      wrote:<br>
    </div>
    <blockquote
cite="mid:CANzdToHsEuJfnLGpPXuKi=COs5ONPri4JmLQaU9XT-3s98gjbg@mail.gmail.com"
      type="cite">
      <pre wrap="">Interesting.  I guess I thought that wouldn't work because it was
"locked" to the hand based on its 'targetOffset' or something..

Thanks a lot.  Although it seems to work there's one strange anomaly.
For background, the action that causes #openInHand to be invoked is by
the user left clicking on a button.  In your example, which is not
invoked by a left click, the morph stays attached to the hand until I
click it down.  With my openInHand: hack it seemed it would also stay
attached without needing to hold down left button.  Very strange.

Morphic is hard stuff.

On Tue, May 28, 2013 at 5:56 PM, Bob Arning <a class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net">&lt;arning315@comcast.net&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">(r _ RectangleMorph new extent: 500@500)
    openInHand;
    position: r center

Cheers,
Bob

On 5/28/13 6:05 PM, Chris Muller wrote:

I'm using #openInHand, which opens my morph, centered under the hand.
I want to open it in the hand, but attached near the upper left corner
rather than the center.

To do this, I factored the temp var "delta" calculation out of
HandMorph&gt;&gt;#attachMorph:, so it would take an argument instead,
attachMorph: aMorph at: delta.  Regular attachMorph now calls it
passing in the center point.

Now I have an attach API that accepts an offset, guess I just need to
support openInHand: offset to call the new #attachMorph:at:.

(Sigh) It works but is there a better way to do this?






</pre>
      </blockquote>
      <pre wrap="">

</pre>
    </blockquote>
    <br>
  </body>
</html>