Re: Tkinter code (with pmw) executing to soon please help

2007-01-14 Thread Gabriel Genellina
<[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > button[num] = Tkinter.Button(frame,text = returnstring, > command=callback(returnstring))# > > I understand this part of it > > def callback(text): > def handler(event): > print text > It stopped calling it automaticaly b

Re: Tkinter code (with pmw) executing to soon please help

2007-01-14 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Scott David Daniels wrote: >> Gabriel Genellina wrote: >> >... So `callback` should return a function, like this: >> > >> > def callback(text): >> > def handler(event): >> > print text >> > >> >> Even better than that: >> def callback(text): >> def ha

Re: Tkinter code (with pmw) executing to soon please help

2007-01-13 Thread [EMAIL PROTECTED]
> button[num] = Tkinter.Button(frame,text = returnstring, > command=callback(returnstring))# I understand this part of it def callback(text): def handler(event): print text It stopped calling it automaticaly but will not do anything when I click on the button. Does something have to cha

Re: Tkinter code (with pmw) executing to soon please help

2007-01-13 Thread [EMAIL PROTECTED]
C:\dex_tracker\csdlist.py bay-at-night.csd Traceback (most recent call last): File "C:\dex_tracker\csdlist.py", line 58, in root.mainloop() File "C:\Python25\lib\lib-tk\Tkinter.py", line 1023, in mainloop self.tk.mainloop(n) File "../../..\Pmw\Pmw_1_2\lib\PmwBase.py", line 1751, in __call__ Fil

Re: Tkinter code (with pmw) executing to soon please help

2007-01-13 Thread Scott David Daniels
Gabriel Genellina wrote: >... So `callback` should return a function, like this: > > def callback(text): > def handler(event): > print text > Even better than that: def callback(text): def handler(event): print text return handler Otherwise callback ret

Re: Tkinter code (with pmw) executing to soon please help

2007-01-13 Thread Gabriel Genellina
<[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Instead of creating my buttons and waiting for me to press them to > execute they are executing when I create them and won't do my callback > when I press them.. thanks for any help in advance This is a very frequent beginner's

Tkinter code (with pmw) executing to soon please help

2007-01-13 Thread [EMAIL PROTECTED]
Instead of creating my buttons and waiting for me to press them to execute they are executing when I create them and won't do my callback when I press them.. thanks for any help in advance button[num] = Tkinter.Button(frame,text = returnstring, command=callback(returnstring))# this line execute