Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Does SWT cocoa need -XstartOnFirstThread ?

Hmm, that seemed to result in my main window not appearing at all.  Interesting.  It basically caused the readAndDispatch event loop to fail faster than previously so that we hung in sleep() more quickly.  I guess this might have worked for you because you were using a mixed AWT/SWT app?

On Tue, May 26, 2009 at 8:11 PM, Dave Smith <dave.smith@xxxxxxxxxxx> wrote:
We were seeing a similar problem here. In the first line of your code add this ...

java.awt.Toolkit.getDefaultToolkit();

That seemed to fix it for us ..


Dave Smith
Candata Systems Ltd.
416-493-9020x2413
Direct: 416-855-2413




On Tue, May 26, 2009 at 3:00 PM, Ben Staniford <ben@xxxxxxxxxxxxx> wrote:

--===============1925193622718627293==
Content-Type: multipart/alternative; boundary=0016e64715d427b920046ad24e4d

--0016e64715d427b920046ad24e4d
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I've just tried to get the application I work on to run with JDK1.6 and the
64 bit Cocoa SWT library on MacOSX.  However, when I ran it, the GUI just
hung in a horrible half running state.

It looked like previous problems I'd experienced with the Carbon library, to
do with the GUI event loop needing to run on Thread-0.  With the carbon
library it was possible to specify -XstartOnFirstThread to ensure that the
GUI stuff was handled by thread 0, but with the cocoa library that option
doesn't seem to make any difference.

Can anyone give tell me what the right approach should be?  Am I going to
have to refactor my application to make main method start the GUI dispatch
stuff before carrying on with other stuff on a different thread, that would
be a bit horrible given my application design.


--
Ben Staniford
Web:    http://www.staniford.net
Phone:  +44 (0) 151 638 0725
Mobile: +44 (0) 7891 842962

--0016e64715d427b920046ad24e4d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I&#39;ve just tried to get the application I work on to run with JDK1.6 and
the 64 bit Cocoa SWT library on MacOSX.=A0 However, when I ran it, the
GUI just hung in a horrible half running state.<br>
<br>
It looked like previous problems I&#39;d experienced with the Carbon
library, to do with the GUI event loop needing to run on Thread-0.=A0
With the carbon library it was possible to specify -XstartOnFirstThread
to ensure that the GUI stuff was handled by thread 0, but with the
cocoa library that option doesn&#39;t seem to make any difference.<br>
<br>
Can anyone give tell me what the right approach should be?=A0 Am I going
to have to refactor my application to make main method start the GUI
dispatch stuff before carrying on with other stuff on a different
thread, that would be a bit horrible given my application design.<br>
<br clear=3D"all"><br>-- <br>Ben Staniford<br>Web: =A0 =A0<a href=""> /www.staniford.net">http://www.staniford.net</a><br>Phone: =A0+44 (0) 151 6=
38 0725<br>Mobile: +44 (0) 7891 842962<br>

--0016e64715d427b920046ad24e4d--

--===============1925193622718627293==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

--===============1925193622718627293==--



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev




--
Ben Staniford
Web:    http://www.staniford.net
Phone:  +44 (0) 151 638 0725
Mobile: +44 (0) 7891 842962

Back to the top