I'm experimenting with subclassing PasteUpMorph to get some additional
behavior. One thing I want to do is have my subclass open with a
CircleMorph at 0@0. I already get that behavior, the CircleMorph in the
upper left corner, but want my subclass' origin to be at its center, and
the CircleMorph drawn there. My current initialize method,

initialize
""

super initialize.
self originAtCenter; addMorph: ((CircleMorph new) color: Color white)
centeredNear: 0@0.

still places it in the upper left corner.

How do I get the origin, 0@0, at the center?

My only other method, so far, sets my subclass default bounds.

defaultBounds
"answer the default bounds for the receiver"
^ 0 @ 0 corner: 400 @ 400
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to