Clark, Chris <Chr...@ca...>:
>
> Hi,
>
> I'm a new anygui user and I'm really impressed with it, its great
> for testing/developing my simple home-brew apps that run under a
> portable Zaurus and a desktop.
I'm glad to hear it.
> However I've hit a problem with terminating the application (the OS
> close window works ok) I need to be able to close/terminate the
> application run loop.
There isn't really any way of doing that directly -- you have to close
all the windows.
> From the mailing list (and from examples such as
> http://www.digitaldarknet.net/python/anyCalc.py , it is in the links
> section from the anygui web page) the advice is to close all
> window(s) using destroy().
Yes.
> This works great under win32 (msw backend). However when I run the
> examples (and my code) under a different backend, say tk under win32
> (I'm using win98) or qt (on a Sharp Zaurus) the application loop
> does NOT terminate. I'm using anygui so I can deploy under a non msw
> backends :-) Is this a bug or a feature? Can I do anything about it
> in my code?
It sounds suspisciously like a bug... Have you tried
test/test_window.py? Just to see whether the loop exits when you close
all windows manually... (There may be something with the destroy
method.)
If you just want to exit the program you could use sys.exit(). If you
want to exit the event loop but not the program, and the intended
Anygui mechanism doesn't work, the following hack might:
try:
app.run()
except SystemExit: pass
# Continue here...
Not that I'd recommend it, though... :)
If you've got the time, perhaps you could try out the CVS version?
There's a good chance that it's even less stable than 0.1.1, but,
pragmatically, there's a greater chance of getting any bugs fixed.
> While I'm here I've another question on textarea's under qt (and tk)
> the multi-line text area has a scroll bar, under msw there is not
> scroll bar (you can use the curor keys to scroll the text area
> though) is there any way around this too?
Is there no scroll bar when you fill the text area with more lines
than it can hold?
[snip]
> Chris
--
Magnus Lie Hetland "Nothing shocks me. I'm a scientist."
http://hetland.org -- Indiana Jones
|