How do you rotate a morph by degrees
I am trying to rotate an instance of a [Transformation morph]. I am sending an "angle:" message, which should work since "angle:" is listed as a method in it's parent class, yet when I sent a message, it claims "it does not understand #angle". Shouldn't messagepassing forward the message to it's parent class? - Steve
test email wrote
Shouldn't messagepassing forward the message to it's parent class?
Yes. Perhaps if you pasted the exact code causing the error and a screenshot of the error it would help. Just a shot in the dark: you said "it does not understand #angle", but the message is #angle: (added colon) ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
On 25/04/19 7:29 PM, Steve Quezadas wrote:
I am trying to rotate an instance of a [Transformation morph]. I am sending an "angle:" message, which should work since "angle:" is listed as a method in it's parent class, yet when I sent a message, it claims "it does not understand #angle". Shouldn't messagepassing forward the message to it's parent class?
Did you mean "TransformationMorph"? I just tried the one-liner below in Pharo 7 (64b Linux) and it worked (TransformationMorph new asFlexOf: ('Hello' asMorph)) angle: (Float pi / 4); openInHand. Regards .. Subbu
Yes, that "addFlexOf" thing seems to be the message I needed to add to get the morph to rotate. Forgive the naive question. On Thu, Apr 25, 2019 at 9:19 AM K K Subbu <kksubbu.ml@gmail.com> wrote:
On 25/04/19 7:29 PM, Steve Quezadas wrote:
I am trying to rotate an instance of a [Transformation morph]. I am sending an "angle:" message, which should work since "angle:" is listed as a method in it's parent class, yet when I sent a message, it claims "it does not understand #angle". Shouldn't messagepassing forward the message to it's parent class?
Did you mean "TransformationMorph"?
I just tried the one-liner below in Pharo 7 (64b Linux) and it worked
(TransformationMorph new asFlexOf: ('Hello' asMorph)) angle: (Float pi / 4); openInHand.
Regards .. Subbu
participants (3)
-
K K Subbu -
Sean P. DeNigris -
Steve Quezadas