Re: [Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Kent Johnson
Michael Lange wrote: >> -- Forwarded message -- >> Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) >> From: Michael Cochez <[EMAIL PROTECTED]> >> To: [EMAIL PROTECTED] >> Subject: Multiple buttons, One callback >> >> Hi Danny, >> I've just been reading your reply on this subject at >> ht

Re: [Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Michael Lange
> -- Forwarded message -- > Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) > From: Michael Cochez <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Multiple buttons, One callback > > Hi Danny, > I've just been reading your reply on this subject at > http://mail.python.org/pipermai

[Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Danny Yoo
Hi everyone, Can someone help with Michael's question? Unfortunately, I can't answer it at the moment. Here it is below. (I've stripped off the image attachment.) -- Forwarded message -- Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) From: Michael Cochez <[EMAIL PROTECTED]> To: [

Re: [Tutor] Multiple buttons, One callback (fwd)

2005-09-17 Thread Danny Yoo
> So, just to see if I understand you, I can create a function that > creates the thunk callback and returns it. This returned thunk callback > (is that a technical term or one of your own, by the way?) can then be > bound as the button's call back and will be able to remember the > parameters pa

Re: [Tutor] Multiple buttons, One callback (fwd)

2005-09-17 Thread Alan G
> creates the thunk callback and returns it. This returned thunk > callback > (is that a technical term or one of your own, by the way?) I'm not sure Danny is using it in the same way but I first came across the term thunk in the Win32 API. Microsoft used thunks to bridge between the new Win32 A

Re: [Tutor] Multiple buttons, One callback (fwd)

2005-09-17 Thread Kent Johnson
Danny Yoo wrote: >>make_callback() is a function that returns a "thunk" callback. That >>returned thunk doesn't take an argument, so it's perfectly appropriate as >>a button callback. Danny, Can you explain the term 'thunk'? I'm not familiar with it and the definitions I can find don't make sen

Re: [Tutor] Multiple buttons, One callback (fwd)

2005-09-17 Thread Danny Yoo
ROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Multiple buttons, One callback Actually, that makes a lot of sense. Feel free to get back to me at your leisure, I'll be working on this problem some today so I might have solved it by the time you respond, but if not t

Re: [Tutor] Multiple buttons, One callback

2005-09-16 Thread Alan G
> I've always been about to bind each button to one callback function > which could then determine which button was clicked, and from that > data grab the necessary data and perfrom the operations on that > data. There are several ways to do this. The most direct is to use bind which passes an

Re: [Tutor] Multiple buttons, One callback

2005-09-16 Thread Danny Yoo
> I've been able to bind each button to the same callback function (that > part's trivial) but what hasn't been trival is determining which button > was clicked and, from this information, gathering the correct datum from > the list of StringVars which make up the first label text. Hi David, I

[Tutor] Multiple buttons, One callback

2005-09-16 Thread David Dashifen Kees
Greetings all: First off, the necessary statistics: Python 2.4 using Tkinter as a GUI manager. Now, the problem: I've got an interface that generates a number of buttons. Each of these buttons performs the same basic task over different data based on which button is clicked. In other langu