From: <je...@un...> - 2006-06-29 14:10:07
|
fix one case of the error "grab failed: another application has grab" M +7 -1 axis.py 1.207 http://unpythonic.net/cgi-bin/viewcvs.cgi/axis/scripts/axis.py.diff?r1=1.206&r2=1.207 --- axis.py 28 Jun 2006 19:21:40 -0000 1.206 +++ axis.py 29 Jun 2006 14:10:02 -0000 1.207 @@ -1301,7 +1301,13 @@ "-fill", "blue", "-outline", "blue") root_window.update_idletasks() root_window.tk.call("focus", "-force", ".info.progress") - root_window.tk.call("grab", ".info.progress") + self.do_grab() + + def do_grab(self): + try: + root_window.tk.call("grab", ".info.progress") + except Tkinter.TclError, detail: + root_window.after_idle(self.do_grab) def update(self, count): if count - self.lastcount > 100: |