[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu3dkit-dev] g3dbezier isEqualToBezier:
From: |
Philippe C . D . Robert |
Subject: |
Re: [Gnu3dkit-dev] g3dbezier isEqualToBezier: |
Date: |
Wed, 16 Oct 2002 19:19:56 +0200 |
Hi,
On Tuesday, October 15, 2002, at 05:06 Uhr, Brent Gulanowski wrote:
I am confused about this. If I am misunderstanding or ignorant of
OpenStep feature, please explain.
G3DBezier's -isEqualToBezier: method uses NSMutableArray's
-isEqualToArray: method, which in turn uses the contained object's
class override of isEqual:. In this case, the contained class is
G3DVector3f, subclass of G3DTuple3f. However, G3DVector3f does not
override -isEqual:, instead it uses G3DTuple3f's -isEqualToTuple3f:.
The behaviour of G3DBezier is probably not correct, you are right.
My question is, how does NSMutableArray know to use the correct
isEqual? Is this taken care of in the runtime somehow?
I assume it does take the wrong one (isEqual:) and thus fails when you
change a controlpoint... But on the other hand I don't want to override
isEqual: on the vector/tuple. So I think we should fix G3DBezier's
implementation directly.
Anyone?
-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip
--
Philippe C.D. Robert
http://www.nice.ch/~phip