[Idle-dev] Extends an events

Matthias Barmeier barmeier@BARMEIER.COM
Thu, 2 Mar 2000 17:33:38 +0100


Hi,

[...code stripped...]
>
> I don't understand why you need the type argument.

I think it could be possible that "someone" want to be called BEFORE the
menus
default function is executed.

Other functions like the "recent files" require that the standard function
was executed.

By simply sorting the array all functions of type 1 will be called before
type 2 and type 3 functions
are called after type 2 functions.

> And why you need
> to pass results between the handlers?

When a function is executed after the standard function the "after function"
needs access to the
results. Instead of accessing some values like the filename directly I think
it should be better
to decouple (right word ?) the callbacks as much as possible. If someone
adds a value nobody needs
nothing happens. Everbody can examine the params dict to see whats in
without knowing something
about the other extensions that could be attached to the same menu.

>
> Tcl already has an event/binding management architecture; see the
> bindtags command
> (http://dev.scriptics.com/man/tcl8.3/TkCmd/bindtags.htm).
>
> I would like to build on that if possible.

Oh, I dont know that the manager is accessible. I will take a look and will
try to make it fit
if possible.