[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Usage Clipboard object multiple times in SWT
|
You should enter a bug report against Platform SWT. Please specify what
eclipse build you were using and what platform you were running on.
"Thilo Brandt" <swt@xxxxxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
08/31/2004 05:59 PM
Please respond to
platform-swt-dev
To
<platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Usage Clipboard object multiple times in SWT
Hello together,
if I run the following code in several Thread, but not in parallel, I can
access the clipboard object only for one time, even if a get a new
Instance
on every new call:
Clipboard cb = new Clipboard(Display.getCurrent());
String textData = "Hello World !";
TextTransfer textTransfer = TextTransfer.getInstance();
cb.setContents(new Object[]{textData}, new
Transfer[]{textTransfer});
cb.dispose();
The error by calling on the second time looks like this:
org.eclipse.swt.SWTError: Cannot set data in clipboard
at org.eclipse.swt.dnd.DND.error(DND.java:225)
at org.eclipse.swt.dnd.DND.error(DND.java:181)
at
org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:290)
at
de.powerisdnmonitor.ui.swt.controls.CallerEditorControl$6.run(CallerEditorCo
ntrol.java:200)
at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:106)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2749)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2434)
at
de.powerisdnmonitor.ui.swt.AbstractBaseComponent.show(AbstractBaseComponent.
java:118)
at
de.powerisdnmonitor.ui.swt.AbstractCommandApplicationComponent.execute(Abstr
actCommandApplicationComponent.java:17)
at
de.powerisdnmonitor.service.trayicon.TrayIcon$ActionHandler$HandlerThread.ru
n(TrayIcon.java:104)
Any ideas and help on this error is appreciated.
Best regards,
Thilo
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev