How do you rotate a morph by degrees

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How do you rotate a morph by degrees

Steve Quezadas
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
Reply | Threaded
Open this post in threaded view
|

Re: How do you rotate a morph by degrees

Sean P. DeNigris
Administrator
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

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How do you rotate a morph by degrees

K K Subbu
In reply to this post by Steve Quezadas
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

Reply | Threaded
Open this post in threaded view
|

Re: How do you rotate a morph by degrees

Steve Quezadas
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 <[hidden email]> 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