Re: Callback functions arguments

2014-10-28 Thread ast
"Chris Angelico" a écrit dans le message de news:mailman.15254.1414482690.18130.python-l...@python.org... On Tue, Oct 28, 2014 at 6:35 PM, ast wrote: That's clear to me now. Spinbox and Scale widgets behave differently, that's all. Command on Scale widget: A procedure to be called every t

Re: Callback functions arguments

2014-10-28 Thread Chris Angelico
On Tue, Oct 28, 2014 at 6:35 PM, ast wrote: > OK, but i still find very strange the choice of Python's designers to > make the Scale behaves like that. That's nothing to do with Python's design. That's all about Tkinter, which presumably is imitating Tk. Python allows the callback function to be

Re: Callback functions arguments

2014-10-28 Thread ast
"Peter Otten" <__pete...@web.de> a écrit dans le message de news:mailman.15231.1414399974.18130.python-l...@python.org... Tanks for you answer Python doesn't "know" it has to pass an argument, it just does it. Change the callback to def maj(): print("no args") and you'll get an error.

Re: Callback functions arguments

2014-10-27 Thread Jean-Michel Pichavant
- Original Message - > From: "ast" > To: python-list@python.org > Sent: Monday, 27 October, 2014 9:16:26 AM > Subject: Callback functions arguments > > Hi > > In this web site at example n°5 > http://fsincere.free.fr/isn/python/cours_python_tkinter.p

Re: Callback functions arguments

2014-10-27 Thread Peter Otten
ast wrote: > Hi > > In this web site at example n°5 > http://fsincere.free.fr/isn/python/cours_python_tkinter.php > > A program is using the "Scale" widget from tkinter module. > Here is a piece of code: > > Valeur = StringVar() > > echelle = Scale(Mafenetre, from_=-100, to=100, resolution=10,

Callback functions arguments

2014-10-27 Thread ast
Hi In this web site at example n°5 http://fsincere.free.fr/isn/python/cours_python_tkinter.php A program is using the "Scale" widget from tkinter module. Here is a piece of code: Valeur = StringVar() echelle = Scale(Mafenetre, from_=-100, to=100, resolution=10, \ orient=HORIZONTAL, length=300,