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

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.



Back to the top