|
From: dman <ds...@ri...> - 2002-01-28 14:14:55
|
On Mon, Jan 28, 2002 at 12:41:16AM -0500, J Scinta II wrote:
| I don't get it. If I instantiate a Frame, it never goes away and holds up
| the interpreter from exiting. In the simplest case:
|
| import java
| java.awt.Frame(visible=1)
|
| The interpreter will not exit. I have tried several things:
|
| import java
| def close(x): x.source.dispose()
| f=java.awt.Frame(visible=1, windowClosing=close)
|
| I close the window, set f=None, exit the interpreter.. it still hangs.
How do you "exit the interpreter"?
If you don't call "sys.exit()" or "java.lang.System.exit()" then the
AWT_EventQueue thread is still running (and it isn't a daemon thread)
so the app won't quit. Normally you will add an event handler to the
closing of the window that calls exit(). (Normally main() returns
long before the program is done running)
-D
--
In my Father's house are many rooms; if it were not so, I would have
told you. I am going there to prepare a place for you. And if I go and
prepare a place for you, I will come and take you to be with me that you
also may be where I am.
John 14:2-3
|