Hi Chris,

Thanks for the explanations. You're right : there was a line missing here :
I added EVT_FC_MOTION: {} in :

    def MakeHitDict(self):
        ##fixme: Should this just be None if nothing has been bound?
        self.HitDict = {EVT_FC_LEFT_DOWN: {},
                        EVT_FC_LEFT_UP: {},
                        EVT_FC_LEFT_DCLICK: {},
                         ...
                        }

and there is no more this KeyError.

But the "motion event" is still not detected : do you think I should add
something elsewhere ?

Jo


2014-03-04 18:25 GMT+01:00 Chris Barker <[email protected]>:

> I don;'t know why there is an error -- I'll see if I can look into that.
>
> But the KeyError related to color is because FloatCanvas uses colors to do
> hit testing:
>
> each object is drawn to an off-screen bitmap in a unique color. When there
> is a mouse event, the color of the pixel under the mouse is checked to see
> what object is there. self.HitColor is the unique color of that object
> (unrelated to the color drawn to teh screen for the user (if any).
>
> I actually think that the key error there is Event, rather than the
> HitColor -- perhaps I forgot to add FC_MOTION to the HitDict....
>
> -Chris
>
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to