From: Shashikant <sp...@in...> - 2006-02-24 14:01:13
|
FYI. This bug is getting very close to being fixed :) Shashi -------- Original Message -------- Subject: [Bug 67384] SWT_AWT not implemented for Mac Date: Thu, 23 Feb 2006 21:01:41 -0500 (EST) From: bug...@ec... To: sha...@gm... https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384 Product/Component: Platform / SWT ------- Comment #127 from sko...@ap... 2006-02-23 20:59 ------- Thanks to Silenio's suggestion, Java 5 Release 4 DP 6 now lets you bring up AWT windows in an SWT application with no modification to your SWT application. I mainly used the examples in comments #119 and #125 to test it. We also modified those examples to open up the SwingSet2 demo application and an AWT widget test in response to an SWT button click or from an arbitrary thread. The change on our part was to use NSApplicationLoad() to create an NSApplication and register Carbon handlers for the application, and then set compatibility mode (see below) to prevent deadlocks when doing AWT operations from the SWT thread. Before anybody's hopes are raised too high, let me stress this is not an implementation of the SWT_AWT package, but it gets us closer to that goal. There are also a few things to remember: -- You still need to use -XstartOnFirstThread. -- You can start the AWT from any thread, but if you're not going to load it from the SWT thread you should set the property 'apple.awt.usingSWT' to true. -- Don't use SwingUtilities.invokeAndWait from the SWT thread. You will hang the application. If you want to trigger some AWT action from SWT, use invokeLater. -- Avoid manipulating AWT objects from the SWT thread. When the SWT is in use, the AWT is loaded in 'Cocoa compatibility mode', which means that if we detect a deadlock while trying to do some Cocoa operation, we'll time out after .1 s and then do it anyway. -- JNLP applications still do not work, even with this compatibility mode. We're working on it, though. ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. |