[squeak-dev] how to attachMorph: at the corner?

Chris Muller asqueaker at gmail.com
Tue May 28 22:05:41 UTC 2013


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>>#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?


More information about the Squeak-dev mailing list