[Newbies] Re: PolygonMorph intersection
omai at mailq.dyndns.org
Wed May 2 15:44:17 UTC 2007
>>r := Rectangle new.
>>r setOrigin: 150 at 0 corner: 175 at 25.
>>p intersects: r
>>returns a message not understood.
>>Am I doing something fundamentally wrong ?
Yes you are.
a rectangle is a polygon indeed. However, a PolygonMorph is a BorderedMorph, NOT a RectangleMorph.
If you look for implementers of #intersects: , you will get only RectangleMorph.
PolygonMorph DOES NOT IMPLEMENT #intersects. So the system does indeed NOT UNDERSTAND the message.
More information about the Beginners