Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Menus on MAC problem. URGENT!
Menus on MAC problem. URGENT! [message #447887] Tue, 21 December 2004 10:09 Go to next message
Oliver Schmidt is currently offline Oliver SchmidtFriend
Messages: 17
Registered: July 2009
Junior Member
We've got an SWT-application with menus and want it to run on MacOS
(outside of Eclipse!). Currently it runs perfectly on Windows and Linux,
but the main-menu doesnŽt work on MacOS.

Can someone please tell us exactly, whatŽs important in this scenario?
- what libraries and configurations do we need?
- Do we have to patch the code or should it run on MacOS without
modification?

A working solution within the next days will be rewarded!

Thanks,
Oliver

(Change "-@-" into "@" in my E-Mail address.)
Re: Menus on MAC problem. URGENT! [message #447889 is a reply to message #447887] Tue, 21 December 2004 13:53 Go to previous messageGo to next message
Tomas Carnecky is currently offline Tomas CarneckyFriend
Messages: 11
Registered: July 2009
Junior Member
Oliver Schmidt wrote:
> We've got an SWT-application with menus and want it to run on MacOS
> (outside of Eclipse!). Currently it runs perfectly on Windows and Linux,
> but the main-menu doesnŽt work on MacOS.

How exactly? Doesn't it show up? Doesn't it do what you'd exept if you
click on a menu entry?
Please describe your problem, maybe with a link to a screenshot.

>
> A working solution within the next days will be rewarded!
>

If you tell exactly what's the problem?

I am not very familar with SWT, but I guess that noone can give you a
good advice without knowing what the problem is.

tom
Re: Menus on MAC problem. URGENT! [message #447894 is a reply to message #447889] Tue, 21 December 2004 15:01 Go to previous messageGo to next message
Oliver Schmidt is currently offline Oliver SchmidtFriend
Messages: 17
Registered: July 2009
Junior Member
Dear Tomas,

thanks for your quick feedback!

I think, first of all we need to know how a working configuration would
look like on a Mac (Version 10.3.7) before we try to analyze the current
behaviour. I think it must be something "obvious" for SWT users on a MAC,
and weŽre just not very familiar with a MAC.

Here is our configuration:
MacOS 10.3.7
SWT version 3101

When we start the application with the java command, it doesnŽt react to
user-input.
When we start the application with the java_swt command, it runs, but when
the main menu is selected, the VM crashes with a bus error.

Ideas?
Oliver
Re: Menus on MAC problem. URGENT! [message #447898 is a reply to message #447894] Tue, 21 December 2004 16:07 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Enter a problem report with the stack trace. Can you make a simple SWT
program that crashes as well? If so, append that to the bug report. Give
us more information to work with. Have you tried a nightly download of SWT
to see if the problem has already been fixed? For example, I remember that
the Mac used to GP instantly if you attempted to pull down a menu that had
no submenu.

"Oliver Schmidt" <swt-@-schmidt-oliver.de> wrote in message
news:cq9dt0$qov$1@www.eclipse.org...
> Dear Tomas,
>
> thanks for your quick feedback!
>
> I think, first of all we need to know how a working configuration would
> look like on a Mac (Version 10.3.7) before we try to analyze the current
> behaviour. I think it must be something "obvious" for SWT users on a MAC,
> and we
Re: Menus on MAC problem. URGENT! [message #447901 is a reply to message #447898] Tue, 21 December 2004 17:10 Go to previous messageGo to next message
Oliver Schmidt is currently offline Oliver SchmidtFriend
Messages: 17
Registered: July 2009
Junior Member
Hi Steve,

thanks for your feedback :-)

> Enter a problem report with the stack trace.
We have no stack trace, since the VM crashes.

> Can you make a simple SWT program that crashes as well?
> Have you tried a nightly download of SWT
> to see if the problem has already been fixed? For example, I remember that
> the Mac used to GP instantly if you attempted to pull down a menu that had
> no submenu.
Oh, very interesting! I will try it and post the result...
Re: Menus on MAC problem. URGENT! [message #447994 is a reply to message #447901] Wed, 22 December 2004 23:36 Go to previous messageGo to next message
Oliver Schmidt is currently offline Oliver SchmidtFriend
Messages: 17
Registered: July 2009
Junior Member
> For example, I remember that
> the Mac used to GP instantly if you attempted to pull down a menu that had
> no submenu.
Ok, the VM crashes only with an empty menu and with swt-version<=3101.
swt-version 3116 doesnŽt crash any more :-)
but empty menu-items canŽt be selected.

I changed our application now to avoid empty menus ;-)

Many thanks for helping!

Here is a code-snippet that produces the problem:
------------------------------------------------------------
import java.util.Date;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;

/**
* Problem snippet for Menus on MacOS
* version 3101: VM-Crash
* version 3116: empty menu-item canŽt be selected
*/
public class testapp {

public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell();
shell.setText("SWT Application");

Menu menubar=new Menu(shell, SWT.BAR);
shell.setMenuBar(menubar);
{
final MenuItem menuItem = new MenuItem(menubar, SWT.NONE);
menuItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent arg0) {
shell.setText(new Date().toString());
}
});
menuItem.setText("BadEntry");
}

shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}
Re: Menus on MAC problem. URGENT! [message #448118 is a reply to message #447887] Mon, 03 January 2005 17:02 Go to previous messageGo to next message
Andre Weinand is currently offline Andre WeinandFriend
Messages: 66
Registered: July 2009
Member
On 21.12.2004 11:09 Uhr, in article cq8soj$mf$1@www.eclipse.org, "Oliver
Schmidt" <swt-@-schmidt-oliver.de> wrote:

> We've got an SWT-application with menus and want it to run on MacOS
> (outside of Eclipse!). Currently it runs perfectly on Windows and Linux,
> but the main-menu doesnŽt work on MacOS.
>
> Can someone please tell us exactly, whatŽs important in this scenario?
> - what libraries and configurations do we need?
> - Do we have to patch the code or should it run on MacOS without
> modification?

I don't really understand what "the main-menu doesn't work on MacOS" means,
but it sounds that you are trying to run an SWT application from the command
line by using "/usr/bin/java". This does not work on MacOS X.
Please, read this SWT FAQ entry:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/fa
q.html#carbonapp

--andre
Re: Menus on MAC problem. URGENT! [message #448158 is a reply to message #447994] Tue, 04 January 2005 16:02 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Please enter a problem report for "empty menu-items can't be selected".

"Oliver Schmidt" <swt-@-schmidt-oliver.de> wrote in message
news:cqd0eh$7j1$1@www.eclipse.org...
> > For example, I remember that
> > the Mac used to GP instantly if you attempted to pull down a menu that
had
> > no submenu.
> Ok, the VM crashes only with an empty menu and with swt-version<=3101.
> swt-version 3116 doesn
Previous Topic:Transparent shell..
Next Topic:ScrolledComposite Problems
Goto Forum:
  


Current Time: Fri Apr 19 00:57:03 GMT 2024

Powered by FUDForum. Page generated in 0.02456 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top