Hi Chris,
The Bind issue is resolved, while testing this I noted another issue
with Groups and I wonder if that could be fixed too.
e.g. I do this:
startPos = self.getStartPos() + 2
rackFrame = rutils.MovingRectangle((startPos, 0), (100, 100))
# add it to canvas too, otherwise next object will overlap
this one
self.canvas.AddObject(rackFrame)
rackUnit.AddObject(rackFrame)
rackUnit.Bind(fc.EVT_FC_LEFT_DOWN, self.objectHit)
If I don't add the rackFrame to the canvas directly then the getStartPos
does not get the right position, i.e. the next object I add will be
drawn on top of the previous one. Note that the rackUnit in this case
is a "class MovingGroup(fc.Group, MovingObjectMixin,
RackUnitPersistanceMixin):"
def getStartPos(self):
if self.canvas.BoundingBoxDirty:
self.canvas._ResetBoundingBox()
bBox = self.canvas.BoundingBox[1]
if bBox.IsNull():
startPos = 0
else:
startPos = bBox[0]
return startPos
Is above enough information for you, or do I need to debug it further?
Werner
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas