... the user friendly GPS tool


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RouteConverter and Mac OS X
(19.09.2010, 10:19)hvdwolf Wrote: Sorry for being "away" for quite some time.

I'm glad you're here again!

(19.09.2010, 10:19)hvdwolf Wrote: Could it have something to do with the window focus? Does this "Thread.sleep()" function maintain the focus within the main program/window, thereby stealing it from the popup? In this case the popup simply doesn't get the focus.

I understand the connection between the Thread.sleep() and the file dialog as the following:
  • in Mac OS X the first thread of a process does the event processing
  • for Java, it seems the Apple engineers managed to connect this directly to the AWT-EventQueue thread which is the single Java thread used to update the user interface for pure Java apps -XstartOnFirstThread is not necessary
  • for the browser, I'm using a library (DJNativeSwingSWT) that allows to embed Eclipse SWT components into Javas Swing UI framework
  • Eclipse SWT consists of native code and Java wrappers (where Java Swing is pure Java)
  • this means the event processing becomes a problem since events from the operating system must reach the native code components i.e. the browser and the pure Java Swing (via the native Java VM)
  • -XstartOnFirstThread and the Java class chrriis.dj.nativeswing.swtimpl.NativeInterface help to make sure that this hybrid SWT/Swing setup works
  • if you now open the file dialog and after several layers of abstract at some point the Java VM calls the Mac OS to open a window that seems to collide with the Java thread I've throttled with Thread.sleep() which tries to call the native browser component
  • I guess the reason for this collision is the single threaded approach of either Mac OS communicating with the apps its running or the Java VM executing AWT/Swing apps

Does this sound reasonable?

After writing the above, I've looked through the code (again) and searched for places where the access of the browser component could be parallized. Please have a look at EclipseSWTMapView#executeScript and #executeScriptWithResult and remove all the webBrowser.runInSequence( .. ) blocks, i.e.

Quote: webBrowser.runInSequence(new Runnable() {
public void run() {
webBrowser.executeJavascript(script);
}
});
becomes

Quote: webBrowser.executeJavascript(script);

Does this show any effect?

(19.09.2010, 10:19)hvdwolf Wrote: BTW: I stumbled upon this article (http://nadeausoftware.com/node/90).

I don't understand why you're citing this. What is special about that page?
--
Christian
Reply


Messages In This Thread
RouteConverter and Mac OS X - by CalvinFold - 26.03.2010, 16:11
RE: RouteConverter and Mac OS X - by d101au - 05.04.2010, 22:48
RE: RouteConverter and Mac OS X - by ioeioe - 10.04.2010, 18:53
RE: RouteConverter and Mac OS X - by ioeioe - 10.04.2010, 19:27
RE: RouteConverter and Mac OS X - by ioeioe - 11.04.2010, 22:43
RE: RouteConverter and Mac OS X - by ioeioe - 12.04.2010, 11:39
RE: RouteConverter and Mac OS X - by hvdwolf - 27.05.2010, 18:23
RE: RouteConverter and Mac OS X - by hvdwolf - 28.05.2010, 07:03
RE: RouteConverter and Mac OS X - by hvdwolf - 28.05.2010, 10:00
RE: RouteConverter and Mac OS X - by hvdwolf - 28.05.2010, 18:48
RE: RouteConverter and Mac OS X - by hvdwolf - 29.05.2010, 09:33
RE: RouteConverter and Mac OS X - by hvdwolf - 29.05.2010, 11:44
RE: RouteConverter and Mac OS X - by hvdwolf - 03.06.2010, 19:22
RE: RouteConverter and Mac OS X - by hvdwolf - 28.05.2010, 13:02
RE: RouteConverter and Mac OS X - by hvdwolf - 29.05.2010, 14:18
RE: RouteConverter and Mac OS X - by hvdwolf - 01.06.2010, 10:35
RE: RouteConverter and Mac OS X - by hvdwolf - 30.05.2010, 10:43
RE: RouteConverter and Mac OS X - by hvdwolf - 02.06.2010, 21:46
RE: RouteConverter and Mac OS X - by hvdwolf - 01.06.2010, 16:24
RE: RouteConverter and Mac OS X - by hvdwolf - 01.06.2010, 18:56
RE: RouteConverter and Mac OS X - by hvdwolf - 01.06.2010, 20:12
RE: RouteConverter and Mac OS X - by hvdwolf - 04.06.2010, 16:05
RE: RouteConverter and Mac OS X - by hvdwolf - 04.06.2010, 19:33
RE: RouteConverter and Mac OS X - by hvdwolf - 16.06.2010, 17:18
RE: RouteConverter and Mac OS X - by hvdwolf - 16.06.2010, 21:42
RE: RouteConverter and Mac OS X - by hvdwolf - 18.06.2010, 18:39
RE: RouteConverter and Mac OS X - by hvdwolf - 19.06.2010, 07:44
RE: RouteConverter and Mac OS X - by hvdwolf - 19.06.2010, 07:55
RE: RouteConverter and Mac OS X - by hvdwolf - 19.06.2010, 09:16
RE: RouteConverter and Mac OS X - by hvdwolf - 20.06.2010, 17:16
RE: RouteConverter and Mac OS X - by hvdwolf - 01.07.2010, 17:42
RE: RouteConverter and Mac OS X - by hvdwolf - 08.08.2010, 15:42
RE: RouteConverter and Mac OS X - by hvdwolf - 09.08.2010, 09:27
RE: RouteConverter and Mac OS X - by hvdwolf - 09.08.2010, 18:49
RE: RouteConverter and Mac OS X - by hvdwolf - 16.08.2010, 09:47
RE: RouteConverter and Mac OS X - by hvdwolf - 20.08.2010, 09:55
RE: RouteConverter and Mac OS X - by hvdwolf - 19.06.2010, 14:14
RE: RouteConverter and Mac OS X - by dfiler - 29.06.2010, 01:17
RE: RouteConverter and Mac OS X - by hvdwolf - 03.07.2010, 09:33
RE: RouteConverter and Mac OS X - by hvdwolf - 03.07.2010, 17:30
RE: RouteConverter and Mac OS X - by hvdwolf - 19.07.2010, 06:31
RE: RouteConverter and Mac OS X - by rctdigo8 - 05.08.2010, 12:41
RE: RouteConverter and Mac OS X - by rctdigo8 - 05.08.2010, 22:56
RE: RouteConverter and Mac OS X - by hvdwolf - 06.08.2010, 15:50
RE: RouteConverter and Mac OS X - by rctdigo8 - 06.08.2010, 21:36
RE: RouteConverter and Mac OS X - by hvdwolf - 06.08.2010, 22:34
RE: RouteConverter and Mac OS X - by asp - 23.08.2010, 09:24
RE: RouteConverter and Mac OS X - by asp - 23.08.2010, 09:53
RE: RouteConverter and Mac OS X - by hvdwolf - 23.08.2010, 12:49
RE: RouteConverter and Mac OS X - by hvdwolf - 23.08.2010, 21:11
RE: RouteConverter and Mac OS X - by hvdwolf - 23.08.2010, 22:43
RE: RouteConverter and Mac OS X - by hvdwolf - 24.08.2010, 17:33
RE: RouteConverter and Mac OS X - by hvdwolf - 25.08.2010, 20:12
RE: RouteConverter and Mac OS X - by hvdwolf - 26.08.2010, 10:57
RE: RouteConverter and Mac OS X - by hvdwolf - 27.08.2010, 19:23
RE: RouteConverter and Mac OS X - by hvdwolf - 27.08.2010, 20:17
RE: RouteConverter and Mac OS X - by hvdwolf - 26.08.2010, 21:50
RE: RouteConverter and Mac OS X - by hvdwolf - 28.08.2010, 12:28
RE: RouteConverter and Mac OS X - by hvdwolf - 29.08.2010, 13:53
RE: RouteConverter and Mac OS X - by hvdwolf - 29.08.2010, 20:51
RE: RouteConverter and Mac OS X - by hvdwolf - 30.08.2010, 10:48
RE: RouteConverter and Mac OS X - by hvdwolf - 01.09.2010, 20:02
RE: RouteConverter and Mac OS X - by hvdwolf - 02.09.2010, 11:53
RE: RouteConverter and Mac OS X - by hvdwolf - 06.09.2010, 19:23
RE: RouteConverter and Mac OS X - by hvdwolf - 19.09.2010, 10:19
RE: RouteConverter and Mac OS X - by routeconverter - 19.09.2010, 11:43
RE: RouteConverter and Mac OS X - by hvdwolf - 19.09.2010, 17:10
RE: RouteConverter and Mac OS X - by hvdwolf - 25.10.2010, 18:00
RE: RouteConverter and Mac OS X - by hvdwolf - 25.10.2010, 20:51
RE: RouteConverter and Mac OS X - by hvdwolf - 26.10.2010, 17:24
RE: RouteConverter and Mac OS X - by hvdwolf - 27.10.2010, 16:21
RE: RouteConverter and Mac OS X - by hvdwolf - 28.10.2010, 12:03
RE: RouteConverter and Mac OS X - by hvdwolf - 28.10.2010, 17:49
RE: RouteConverter and Mac OS X - by hvdwolf - 28.10.2010, 21:27
RE: RouteConverter and Mac OS X - by hvdwolf - 29.10.2010, 16:26
RE: RouteConverter and Mac OS X - by hvdwolf - 30.08.2010, 19:06
RE: RouteConverter and Mac OS X - by hvdwolf - 30.08.2010, 21:48
RE: RouteConverter and Mac OS X - by hvdwolf - 30.10.2010, 07:41
RE: RouteConverter and Mac OS X - by hvdwolf - 31.10.2010, 19:22
RE: RouteConverter and Mac OS X - by hvdwolf - 01.11.2010, 18:45
RE: RouteConverter and Mac OS X - by hvdwolf - 02.11.2010, 23:15
RE: RouteConverter and Mac OS X - by hvdwolf - 03.11.2010, 17:22
RE: RouteConverter and Mac OS X - by hvdwolf - 03.11.2010, 21:44
RE: RouteConverter and Mac OS X - by hvdwolf - 05.11.2010, 20:32
RE: RouteConverter and Mac OS X - by hvdwolf - 06.11.2010, 17:54
RE: RouteConverter and Mac OS X - by hvdwolf - 09.11.2010, 21:16
RE: RouteConverter and Mac OS X - by hvdwolf - 12.11.2010, 18:04
RE: RouteConverter and Mac OS X - by hvdwolf - 13.11.2010, 08:29
RE: RouteConverter and Mac OS X - by hvdwolf - 14.11.2010, 17:24
RE: RouteConverter and Mac OS X - by hvdwolf - 15.11.2010, 22:43
RE: RouteConverter and Mac OS X - by Gerwin - 15.11.2010, 19:18
RE: RouteConverter and Mac OS X - by Gerwin - 16.11.2010, 18:46
RE: RouteConverter and Mac OS X - by Gerwin - 17.11.2010, 10:19
RE: RouteConverter and Mac OS X - by hvdwolf - 18.11.2010, 22:53
RE: RouteConverter and Mac OS X - by hvdwolf - 20.11.2010, 21:45
RE: RouteConverter and Mac OS X - by hvdwolf - 21.11.2010, 08:30

Forum Jump:


Users browsing this thread: 1 Guest(s)