TK program problem

rantingrick rantingrick at gmail.com
Fri May 20 19:37:08 EDT 2011


On May 20, 6:07 pm, bvdp <b... at mellowood.ca> wrote:
> Probably the fix is to use a function :)
>
> > The docs [1] say that a callback is a function, so I guess that if it
> > worked before it was just luck.  You should bring it up on the tkinter
> > list and see what they have to say about it, though.
>
> > I'm a bit confused about why you would want to use a class as a
> > callback anyway.  It looks like when the button is clicked it
> > instantiates the class and then throws it away?
>
> I have no idea why I used a class like this, expect that it seemed to
> work at the time. Yes, the class is instantiated when the button is
> clicked. Then, the user stays in the class and uses its methods until
> he hits <close> in the class.

Thats sounds to me a lot like hammering square pegs though round
holes... Perhaps you should explain first in "plain english" what
problem your application is intended to solve, then how it is expected
to interact with the user, and finally, what exactly is NOT working
correctly. I would suffix such a documentary with the current source
code, verbatim.




More information about the Python-list mailing list