Community
Participate
Working Groups
Build id: I20060504-1600 Have a composite and add one (or more) child to it. Hook a file droptarget listener to it and add more children to the composite during the drop callback. The error depends on the widget you add, if it is a CCombo the application will crash, other widget cause cheese. Here the snippet: static void addItem (Composite c, String string) { CCombo combo = new CCombo(c, SWT.NONE); combo.setItems(new String[] {"win32", "motif", "gtk", "carbon", "photon"}); c.layout(); } public static void main (String [] args) { final Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new FillLayout()); final Composite c = new Composite(shell, SWT.BORDER); c.setLayout(new RowLayout()); addItem (c, "initial item"); display.addFilter(SWT.KeyDown, new Listener() { public void handleEvent(Event event) { if (event.keyCode == SWT.F2) { String[] files = {"File 0", "File 1", "File 2", "File 3", "File 4"}; for (int i = 0; i < files.length; i++) { addItem (c, files[i]); } } } }); int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT; DropTarget target = new DropTarget(c, operations); final FileTransfer fileTransfer = FileTransfer.getInstance(); Transfer[] types = new Transfer[] {fileTransfer}; target.setTransfer(types); target.addDropListener(new DropTargetAdapter() { public void drop(DropTargetEvent event) { if (fileTransfer.isSupportedType(event.currentDataType)) { String[] files = (String[]) event.data; for (int i = 0; i < files.length; i++) { addItem (c, files[i]); } } } }); shell.setSize(550, 380); shell.open (); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep (); } } display.dispose (); }
I can't reproduce this problem if, in OS.java, I comment out the line: OS.ActivateActCtx (hActCtx, lpCookie);
This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.