Hi, all.
I'd like to get some help on how to compare two wxShape objects.
I was trying to implement to draw a line between two wxRectangleShape
objects and I have a problem in checking two wxRectangleShape are identical.
I don't want to draw anything in case of identical wxRectangleShapes.
I expected I could check identity with if statement like below code segment.
if conceptWindow.fromConcept == shape:
pass
Where, conceptWindow.fromConcept is the first wxRectangleShape object
created in the previous mouse click and shape is the second wxRectangleShape
being clicked.
I found that these two wxRectangleShape objects has the same memory
allocation. Here is the result of "print conceptWindow.fromConcept and print
shape" statements.
<C wxPyRectangleShape instance at _dcc030_wxPyRectangleShape_p>
<C wxPyRectangleShape instance at _dcc030_wxPyRectangleShape_p>
But wxPython doesn't consider these two wxRectangleShape objects identical.
wxPython considers them different objects. Is there any convenient way of
comparing wxShape objects?
Since the if statement didn't work, I tried to compare the text attached to
each wxRectangleShape object. But I found there is no getText() method on
the wxShape class. I only found AddText() and RemoveText(). Is there any way
to read the attached text on the wxShape object?
TIA.
YJ