On Wed, 2 Aug 2000, Czichy, Thoralf wrote:

> Hello,
> 
> I've got a problem using some swing classes in tcljava - called from an
> event handling procedure a dialog object does not work correct.
> 
> As long as a Dialog object is created and shown within a 'normal' procedure
> everything works fine - as shown with the call to  'testProc" from the last
> line of the sample program below. As soon as I bind it to an event (button
> pressed) and the user presses the button  the dialog window still shows up,
> but no components in this window are shown (no buttons, no text - just an
> empty window).
> 
> Anyone knows anything about this behaviour? Is it a java or a jaclsh
> problem?

This is the old "show dialog" problem. Basically, swing and the
AWT in general are really stupid, they block the thread that
shows a dialog. The "fix" is to call the show command with the
unsupported::jdetachcall command. It will spawn another thread
that will block in the dialog show call. This might seem
like a hack, but it is the same one the AWT uses.

cheers
Mo DeJong
Red Hat Inc

----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com

Reply via email to