Home » Eclipse Projects » Standard Widget Toolkit (SWT) » AWT_SWT on mac osx
| | | |
Re: AWT_SWT on mac osx [message #452739 is a reply to message #452730] |
Thu, 24 March 2005 08:44 |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
What an Apple guy told me at EclipseCon is they want to hire an engineer
to do a Cocoa port of SWT, which would surely fix the SWT/AWT problem,
since AWT runs in Cocoa but the solution is likely to be a long way off
and may not happen at all. If I had to make a plan I wouldn't even think
about it.
Bob
Anthony Perritano wrote:
> Hi,
> I have been reading alot of the problems associated with the SWT_AWT
> bridge on osx. I noticed a posting on apples job site for a Java
> Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
> do these mean? I have read conflicting messages such as "impossible" and
> "not yet". Will there ever be? if so, in 3-9 months?
>
> Thanks
> Anthony Perritano
>
> Frank Sauer wrote:
>
>> Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>> This is a vry serious problem and I don't know if this is ever going
>> to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>> of OSX???
>>
>> Frank
>>
>> Anthony Perritano wrote:
>>
>>> Hi,
>>> is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>> for windows and linux?
>>>
>>> I would like my RCP application pop up AWT/Swing windows? is there
>>> anyway i can make that happen now?
>>>
>>> thanks,
>>> Anthony Perritano
|
|
|
Re: AWT_SWT on mac osx [message #453023 is a reply to message #452735] |
Wed, 30 March 2005 00:39 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
It's a hard problem that will most likely require lots of help from Apple.
It's possible that this will be on the 3.2 plan. In the meantime, unless
you really need the features from AWT/Swing and the port is doable, I'd
suggest trying it. At the very least, your app will use less memory because
there will only be one GUI toolkit running.
"Frank Sauer" <fsauer65@mac.com> wrote in message
news:d1tmeh$9b8$1@news.eclipse.org...
> I would love to know the answer to this as well. A rough timeframe will
> help me decide whether to embark on a major AWT => SWT/Draw2D porting
> effort or not..... I'd rather not if there is a reasonable timeframe for
> a working bridge.
>
> Thanks,
>
> Frank
>
> Anthony Perritano wrote:
> > Hi,
> > I have been reading alot of the problems associated with the SWT_AWT
> > bridge on osx. I noticed a posting on apples job site for a Java
> > Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> > that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
> > do these mean? I have read conflicting messages such as "impossible" and
> > "not yet". Will there ever be? if so, in 3-9 months?
> >
> > Thanks
> > Anthony Perritano
> >
> > Frank Sauer wrote:
> >
> >> Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
> >> This is a vry serious problem and I don't know if this is ever going
> >> to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
> >> of OSX???
> >>
> >> Frank
> >>
> >> Anthony Perritano wrote:
> >>
> >>> Hi,
> >>> is there anytime frame for a AWT_SWT bridge for osx similar to ones
> >>> for windows and linux?
> >>>
> >>> I would like my RCP application pop up AWT/Swing windows? is there
> >>> anyway i can make that happen now?
> >>>
> >>> thanks,
> >>> Anthony Perritano
|
|
|
Re: AWT_SWT on mac osx [message #453037 is a reply to message #453023] |
Wed, 30 March 2005 01:18 |
Anthony Perritano Messages: 32 Registered: July 2009 |
Member |
|
|
Given that you can't add a awt component to a swt one on Mac - Is it
possible to spawn a swing app from from an swt app?
For instance an swt app with a button and event tied to it. In that
event create a new thread and with a JFrame. is this part of the swt_awt
issue? how does eclipse launch a awt app? if so is there a snippet some
where i can use to launch a awt app from some swt?
thanks
Anthony Perritano
Steve Northover wrote:
> It's a hard problem that will most likely require lots of help from Apple.
> It's possible that this will be on the 3.2 plan. In the meantime, unless
> you really need the features from AWT/Swing and the port is doable, I'd
> suggest trying it. At the very least, your app will use less memory because
> there will only be one GUI toolkit running.
>
> "Frank Sauer" <fsauer65@mac.com> wrote in message
> news:d1tmeh$9b8$1@news.eclipse.org...
>
>>I would love to know the answer to this as well. A rough timeframe will
>>help me decide whether to embark on a major AWT => SWT/Draw2D porting
>>effort or not..... I'd rather not if there is a reasonable timeframe for
>>a working bridge.
>>
>>Thanks,
>>
>>Frank
>>
>>Anthony Perritano wrote:
>>
>>>Hi,
>>>I have been reading alot of the problems associated with the SWT_AWT
>>>bridge on osx. I noticed a posting on apples job site for a Java
>>>Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
>>>that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
>>>do these mean? I have read conflicting messages such as "impossible" and
>>>"not yet". Will there ever be? if so, in 3-9 months?
>>>
>>>Thanks
>>>Anthony Perritano
>>>
>>>Frank Sauer wrote:
>>>
>>>
>>>>Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>>>>This is a vry serious problem and I don't know if this is ever going
>>>>to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>>>>of OSX???
>>>>
>>>>Frank
>>>>
>>>>Anthony Perritano wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>>>>for windows and linux?
>>>>>
>>>>>I would like my RCP application pop up AWT/Swing windows? is there
>>>>>anyway i can make that happen now?
>>>>>
>>>>>thanks,
>>>>>Anthony Perritano
>
>
>
|
|
|
Re: AWT_SWT on mac osx [message #453158 is a reply to message #453037] |
Wed, 30 March 2005 20:17 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
If you spawn the swing app in another process it should work. Otherwise, it
won't.
"Anthony Perritano" <aperritano@gmail.com> wrote in message
news:4249FE82.5070206@gmail.com...
> Given that you can't add a awt component to a swt one on Mac - Is it
> possible to spawn a swing app from from an swt app?
> For instance an swt app with a button and event tied to it. In that
> event create a new thread and with a JFrame. is this part of the swt_awt
> issue? how does eclipse launch a awt app? if so is there a snippet some
> where i can use to launch a awt app from some swt?
>
> thanks
> Anthony Perritano
>
>
> Steve Northover wrote:
> > It's a hard problem that will most likely require lots of help from
Apple.
> > It's possible that this will be on the 3.2 plan. In the meantime,
unless
> > you really need the features from AWT/Swing and the port is doable, I'd
> > suggest trying it. At the very least, your app will use less memory
because
> > there will only be one GUI toolkit running.
> >
> > "Frank Sauer" <fsauer65@mac.com> wrote in message
> > news:d1tmeh$9b8$1@news.eclipse.org...
> >
> >>I would love to know the answer to this as well. A rough timeframe will
> >>help me decide whether to embark on a major AWT => SWT/Draw2D porting
> >>effort or not..... I'd rather not if there is a reasonable timeframe for
> >>a working bridge.
> >>
> >>Thanks,
> >>
> >>Frank
> >>
> >>Anthony Perritano wrote:
> >>
> >>>Hi,
> >>>I have been reading alot of the problems associated with the SWT_AWT
> >>>bridge on osx. I noticed a posting on apples job site for a Java
> >>>Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> >>>that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)".
what
> >>>do these mean? I have read conflicting messages such as "impossible"
and
> >>>"not yet". Will there ever be? if so, in 3-9 months?
> >>>
> >>>Thanks
> >>>Anthony Perritano
> >>>
> >>>Frank Sauer wrote:
> >>>
> >>>
> >>>>Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
> >>>>This is a vry serious problem and I don't know if this is ever going
> >>>>to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
> >>>>of OSX???
> >>>>
> >>>>Frank
> >>>>
> >>>>Anthony Perritano wrote:
> >>>>
> >>>>
> >>>>>Hi,
> >>>>>is there anytime frame for a AWT_SWT bridge for osx similar to ones
> >>>>>for windows and linux?
> >>>>>
> >>>>>I would like my RCP application pop up AWT/Swing windows? is there
> >>>>>anyway i can make that happen now?
> >>>>>
> >>>>>thanks,
> >>>>>Anthony Perritano
> >
> >
> >
|
|
|
Re: AWT_SWT on mac osx [message #453164 is a reply to message #453158] |
Wed, 30 March 2005 22:58 |
Anthony Perritano Messages: 32 Registered: July 2009 |
Member |
|
|
theres some test code. when i press the button i get the following
2005-03-30 14:50:43.485 java[869] Apple AWT Java VM was loaded on first
thread -- can't start AWT.
Exception in thread "main" java.lang.InternalError: Can't start the AWT
because Java was started on the first thread. Make sure
StartOnFirstThread is not specified in your application's Info.plist or
on the command line.
i am using the SWT Launcher to run this. Is there an alterative
solution? My end goal for my swt app is to launch a swing app do
something, then return some result back to my swt app.
thanks
Anthony
public class GoButton {
public void go() {
Display display = Display.getDefault();
Shell shell = new Shell (display);
Label label = new Label (shell, SWT.NONE);
label.setText("GO Button GO");
Button ok = new Button(shell, SWT.PUSH);
ok.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
System.out.println("GoButton.main()");
Thread goThread = new Thread(new Runnable(){
public void run() {
System.out.println("Threader");
JFrame jf = new JFrame();
jf.setName("hey");
jf.setBounds(10, 10, 200, 200);
jf.getContentPane().add(new
JLabel("Test:"), java.awt.BorderLayout.WEST);
jf.getContentPane().add(new
JButton("Test"));
jf.getContentPane().add(new
JLabel("Hey"), java.awt.BorderLayout.SOUTH);
jf.setVisible(true);
jf.show();
}
});
goThread.start();
}// handleEvent
});
ok.setText("Ok");
Button cancel = new Button(shell, SWT.PUSH);
shell.setLayout (new RowLayout ());
shell.pack ();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
public static void main (String [] args) {
GoButton gb = new GoButton();
gb.go();
}
}
Steve Northover wrote:
> If you spawn the swing app in another process it should work. Otherwise, it
> won't.
>
> "Anthony Perritano" <aperritano@gmail.com> wrote in message
> news:4249FE82.5070206@gmail.com...
>
>>Given that you can't add a awt component to a swt one on Mac - Is it
>>possible to spawn a swing app from from an swt app?
>>For instance an swt app with a button and event tied to it. In that
>>event create a new thread and with a JFrame. is this part of the swt_awt
>>issue? how does eclipse launch a awt app? if so is there a snippet some
>>where i can use to launch a awt app from some swt?
>>
>>thanks
>>Anthony Perritano
>>
>>
>>Steve Northover wrote:
>>
>>>It's a hard problem that will most likely require lots of help from
>
> Apple.
>
>>>It's possible that this will be on the 3.2 plan. In the meantime,
>
> unless
>
>>>you really need the features from AWT/Swing and the port is doable, I'd
>>>suggest trying it. At the very least, your app will use less memory
>
> because
>
>>>there will only be one GUI toolkit running.
>>>
>>>"Frank Sauer" <fsauer65@mac.com> wrote in message
>>>news:d1tmeh$9b8$1@news.eclipse.org...
>>>
>>>
>>>>I would love to know the answer to this as well. A rough timeframe will
>>>>help me decide whether to embark on a major AWT => SWT/Draw2D porting
>>>>effort or not..... I'd rather not if there is a reasonable timeframe for
>>>>a working bridge.
>>>>
>>>>Thanks,
>>>>
>>>>Frank
>>>>
>>>>Anthony Perritano wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>I have been reading alot of the problems associated with the SWT_AWT
>>>>>bridge on osx. I noticed a posting on apples job site for a Java
>>>>>Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
>>>>>that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)".
>
> what
>
>>>>>do these mean? I have read conflicting messages such as "impossible"
>
> and
>
>>>>>"not yet". Will there ever be? if so, in 3-9 months?
>>>>>
>>>>>Thanks
>>>>>Anthony Perritano
>>>>>
>>>>>Frank Sauer wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>>>>>>This is a vry serious problem and I don't know if this is ever going
>>>>>>to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>>>>>>of OSX???
>>>>>>
>>>>>>Frank
>>>>>>
>>>>>>Anthony Perritano wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi,
>>>>>>>is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>>>>>>for windows and linux?
>>>>>>>
>>>>>>>I would like my RCP application pop up AWT/Swing windows? is there
>>>>>>>anyway i can make that happen now?
>>>>>>>
>>>>>>>thanks,
>>>>>>>Anthony Perritano
>>>
>>>
>>>
>
>
|
|
| |
Goto Forum:
Current Time: Wed Apr 24 23:49:48 GMT 2024
Powered by FUDForum. Page generated in 0.03822 seconds
|