[Tkinter-discuss] ANN: PyUseCase 3.3: GUI testing for Tkinter (and PyGTK)

2010-05-27 Thread Geoff Bache
tried a wider range of test applications. It should be easy to download and try out... Regards, Geoff Bache A bit more detail: PyUseCase is an unconventional GUI testing tool for PyGTK and Tkinter, along with a framework for testing Python GUIs in general. Instead of recording GUI mechanics dir

Re: [Tkinter-discuss] after and after_idle

2010-05-19 Thread Geoff Bache
>                        . > I quote two Masters of Tk: > >    Idles run until the idle queue is drained.  If >    an [after idle] reschedules itself endlessly, it >    hangs the event loop.  [after idle [after 0 ...]] >    causes the idle to schedule a timer event that's >    immediately ready, so

Re: [Tkinter-discuss] after and after_idle

2010-05-17 Thread Geoff Bache
On Mon, May 17, 2010 at 11:01 PM, Cameron Laird wrote: > On Mon, May 17, 2010 at 10:52:56PM +0200, Geoff Bache wrote: >                        . >                        . >                        . >> root.after_idle(foo) >> >> and >> >> root.after(0,

[Tkinter-discuss] after and after_idle

2010-05-17 Thread Geoff Bache
.) instead, but wondered if there were any drawbacks to doing this.) Regards, Geoff Bache ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

Re: [Tkinter-discuss] What's the point of Toplevel.wait_window?

2010-05-11 Thread Geoff Bache
> According to it waits for the window to be > destroyed. Why do you ask? Hi Russell, I realise that, but if I just don't call it and return control to the mainloop then much the same thing will happen anyway (i.e. the application will wait for events in the window conc

[Tkinter-discuss] What's the point of Toplevel.wait_window?

2010-05-10 Thread Geoff Bache
ocal wait loop but I can't actually discern any external effect from calling it. Regards, Geoff Bache ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss

[Tkinter-discuss] Menu.unpost not working on Windows?

2010-05-04 Thread Geoff Bache
Hi all, I've been trying to use the "unpost" method on a popup menu and I cannot make it work on Windows. It works fine on Linux, but seems to have no effect on Windows even in simple cases. For example this basic example code the menu is not unposted in Windows and is shown as without the "unpost

[Tkinter-discuss] ANN: PyUseCase 3.2 - GUI testing for Tkinter (and PyGTK)

2010-02-26 Thread Geoff Bache
nterested to here from you - I'm very happy to help people get started. Regards, Geoff Bache A bit more detail: PyUseCase is an unconventional GUI testing tool for PyGTK and Tkinter, along with a framework for testing Python GUIs in general. Instead of recording GUI mechanics directly, it

Re: [Tkinter-discuss] Doing things on Tkinter termination

2010-01-26 Thread Geoff Bache
Hi again Michael, >> Why doesn't it work to bind to "" like I did? That seemed >> the intuitive way to go, and it seems to work on Linux... >> > > I don't have a windows box at hand, so I cannot tell. On my linux box > it works, but when I bind the callback to the root tk window the > callback is

Re: [Tkinter-discuss] Doing things on Tkinter termination

2010-01-26 Thread Geoff Bache
On Tue, Jan 26, 2010 at 1:34 PM, Geoff Bache wrote: > Hi Geoff, > > On Tue, 26 Jan 2010 10:11:31 +0100 > Geoff Bache wrote: > >> Hi all, >> >> How would you add some code that is called when the application is >> terminated, that is independent of whether

[Tkinter-discuss] Doing things on Tkinter termination

2010-01-26 Thread Geoff Bache
Hi all, How would you add some code that is called when the application is terminated, that is independent of whether it was closed via the window manager or via some programmatic call within the application, such as a call from a "quit" button? I tried binding to the "destroy" event like this:

Re: [Tkinter-discuss] Persuading after_idle callback to only get called when the window is mapped

2010-01-15 Thread Geoff Bache
Hi again Michael, > > Hmm, from your previous posts I thought you would just do the call to > root.after_idle(self.replayEvents) right before root.mainloop() ? > If so, why not do > >    root.deiconify() >    root.update() >    root.after_idle(self.replayEvents) >    root.mainloop() The problem i

Re: [Tkinter-discuss] Persuading after_idle callback to only get called when the window is mapped

2010-01-13 Thread Geoff Bache
On Wed, Jan 13, 2010 at 10:35 PM, Geoff Bache wrote: > Hi Geoff, > > On Wed, 13 Jan 2010 20:38:53 +0100 > Geoff Bache wrote: > > (...) >> Hi Michael, >> >> I'm trying to write a basic GUI testing tool (in fact, I'm trying to >> add basic Tkin

Re: [Tkinter-discuss] Persuading after_idle callback to only get called when the window is mapped

2010-01-13 Thread Geoff Bache
> This sounds like you are trying to access tk from within two different > threads which is generally a bad idea, though it may *seem* to work > sometimes. > Maybe we can provide better help if you could post a short code snippet > that demonstrates your problem. > > Regards > > Michael > Hi Mich

Re: [Tkinter-discuss] Persuading after_idle callback to only get called when the window is mapped

2010-01-11 Thread Geoff Bache
On Mon, Jan 11, 2010 at 8:16 PM, Geoff Bache wrote: > Hi Geoff, > > On Sat, 9 Jan 2010 23:06:17 +0100 > Geoff Bache wrote: > >> Hi all, >> >> I'm trying to add an idle callback via the after_idle method, called >> before mainloop. The problem is tha

[Tkinter-discuss] Persuading after_idle callback to only get called when the window is mapped

2010-01-09 Thread Geoff Bache
efore this has happened. If I then just call after_idle again from it the window never appears at all. Is there a nice way of waiting until there is a window to play with before calling it? I can hardcode a delay by calling "after" instead, and this works but is obviously not ideal. Regar