Tim Ansell wrote:
> Maybe you could try something like,
> 
> try:
>       callback(event, object)
> except TypeError:
>       callback(object)

hmm. Interesting hack.

> This is less likely to break code while still giving the option. It will
> break some code in subtle ways, which may be worse.

I agree -- I know I sometimes write callbacks so that they can also be 
called in other ways, and might well have something like:

def  callBack(Object, OtherData=None)

So that could cause problems

>> 3) Really change things. It's been suggested that rather than binding to 
>> DrawObjects, we should just catch the event on the Canvas, and call 
>> Canvas.WhatObjectsAreHit() method or something. That gives the 
>> programmer a bit more flexibility and control, but takes away the 
>> convenience of simply binding a callback to an event on an object. Of 
>> course, we could probably add this, without removing the existing system.
> 
> I don't see how this would be helpful at all. The current method almost works.

Well, the only real advantage (other than style) is that it opens the 
door to having overlapping objects both register as hit -- but that 
would require a new hit-test mechanism too.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to