Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Cocoa SWT_AWT issues, and a new API proposal


I believe that detecting if  TransformProcessType()needs be called should be done as this bug describes.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=268687

As for documenting the rules, we can add something on the SWT FAQ or to the java doc of SWT_AWT.java. It seems that we should not support the case where the app is started without the -XstartOnFirstThread option.

Silenio


From: Scott Kovatch <skovatch@xxxxxxxxx>
To: "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
Date: 09/18/2009 06:17 PM
Subject: Re: [platform-swt-dev] Cocoa SWT_AWT issues, and a new API proposal
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx






On Sep 18, 2009, at 12:11 PM, Christopher Deckers wrote:

> The standard case probably looks like this:
>
https://bugs.eclipse.org/bugs/attachment.cgi?id=147590
>
> A few notes: display is created in the main method, as recommended by
> SWT. The Swing UI is created in the EDT, as recommended by AWT/Swing.

Found my problem! In Display we check to see if another AWT  
application is running and if it is, we don't call  
TransformProcessType. Removing that check makes everything work.

I forgot that if the AWT detects that it was started on the main  
thread it invokes an NSApplication but doesn't run it or perform any  
of the startup things like becoming a foreground application. The SWT  
needs to do it in that case.

I need to test some more to make sure I didn't break the  
SWT_AWT.new_Frame case, and then I can check it in on Monday.

Related to all of this and my earlier proposal, Chris D. mentioned  
earlier:

> A few notes: display is created in the main method, as recommended  
> by SWT. The Swing UI is created in the EDT, as recommended by AWT/
> Swing.

Are these kinds of rules documented anywhere?  If devs "follow the  
rules" as defined in this example, I don't have to make that many  
changes to Shell or Display, except to detect when the Shell doesn't  
own its window, as would be the case in the SWT_AWT new_Shell state.

-- Scott

----------
Scott Kovatch
Flex Engineering
skovatch@xxxxxxxxx

I am Scott Kovatch, and I approve this message.

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



Back to the top