Thanks to both Sorin and Cameron for the lambda trick which did the job.
Sorin Schwimmer skrev:
lambda is your friend:
optiondict[option].bind("", lambda t='this is a string i want to pass':
self.newdestination(t))
HTH
SxN
__
lambda is your friend:
optiondict[option].bind("", lambda t='this is a string i want to pass':
self.newdestination(t))
HTH
SxN
__
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot
with the All-ne
On Tue, Jul 28, 2009 at 02:04:52PM +0200, jkv wrote:
.
.
.
> Im playing around with Tkinter and cant figure out how to pass arguments
> to a def which are called when pressing a button.
> When i bind to self.newdestination('wha
Hi,
Im playing around with Tkinter and cant figure out how to pass arguments
to a def which are called when pressing a button.
When i bind to self.newdestination('whatever') the def is called (with
arguments) as soon as the button is drawn, whereas when i bind to
self.newdestination the function i