| Summary: | [menu] Popup menu that is set in multiple controls causes Javascript error | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Rüdiger Herrmann <ruediger.herrmann> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | rsternberg |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Here is another SWT Snippet (#89) that causes the same error:
Display display = new Display ();
Shell shell = new Shell (display);
Menu menu = new Menu (shell, SWT.POP_UP);
for (int i=0; i<4; i++) {
MenuItem item = new MenuItem (menu, SWT.RADIO);
item.setText ("Item " + i);
}
shell.setMenu (menu);
shell.setSize (300, 300);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
I think that this is duplicate of bug 223879. You are right, Ivan. This is a duplicate of bug 223879. Sorry for the noise. *** This bug has been marked as a duplicate of bug 223879 *** (In reply to comment #0) > The error message is: > Error: Error: Error in property contextMenu of class Anyways, I'd suggest to redesign the error message to start with: Error! Error! Error! ;-) |
The following snippet (SWT Snippet #40) causes a Javascript error: Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new GridLayout(2, false)); Composite c1 = new Composite (shell, SWT.BORDER); c1.setLayoutData(new GridData(100, 100)); Composite c2 = new Composite (shell, SWT.BORDER); c2.setLayoutData(new GridData(100, 100)); Menu menu = new Menu (shell, SWT.POP_UP); MenuItem item = new MenuItem (menu, SWT.PUSH); item.setText ("Popup"); c1.setMenu (menu); c2.setMenu (menu); shell.setMenu (menu); shell.setSize (300, 300); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } The error message is: Error: Error: Error in property contextMenu of class org.eclipse.swt.widgets.Shell in method setContextMenu with incoming value 'undefined': Undefined value is not allowed! Reproducible in IE 8, Firefox, Chrome