Discussion:
Error: undefined identifier ArrayWrapperString
JohnnyK
2014-02-07 18:55:38 UTC
Permalink
I am getting the following error when trying to use the clipboard
with DWT. Error: undefined identifier ArrayWrapperString. Does
anyone know what I need to import to get this class to work?
Below is what I am currently importing.

import java.io.ByteArrayInputStream;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Button;

import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.FileDialog;

import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.dnd.TextTransfer;

I looked at the clipboard snippet94 example and I just don't know
what I am missing to get ArrayWrapperString. Also I cannot find
this class online in any of the SWT documentation.
Jacob Carlborg
2014-02-07 20:39:40 UTC
Permalink
I am getting the following error when trying to use the clipboard with
DWT. Error: undefined identifier ArrayWrapperString. Does anyone know
what I need to import to get this class to work? Below is what I am
currently importing.
It's defined in "java.lang.wrappers".
I looked at the clipboard snippet94 example and I just don't know what I
am missing to get ArrayWrapperString. Also I cannot find this class
online in any of the SWT documentation.
It's not part of SWT. It's a utility typed added by DWT. It's has most
likely something to do with Java supporting boxing and unboxing of
primitive types and this type tries to do something similar.
--
/Jacob Carlborg
JohnnyK
2014-02-13 15:45:56 UTC
Permalink
Post by Jacob Carlborg
Post by JohnnyK
I am getting the following error when trying to use the
clipboard with
DWT. Error: undefined identifier ArrayWrapperString. Does
anyone know
what I need to import to get this class to work? Below is what I am
currently importing.
It's defined in "java.lang.wrappers".
Post by JohnnyK
I looked at the clipboard snippet94 example and I just don't
know what I
am missing to get ArrayWrapperString. Also I cannot find this class
online in any of the SWT documentation.
It's not part of SWT. It's a utility typed added by DWT. It's
has most likely something to do with Java supporting boxing and
unboxing of primitive types and this type tries to do something
similar.
Thanks Jacob, I just moved the import java.lang.all; down to
just before where I needed the method since that is the only
method I needed. import java.lang.all; indexOf method conflicts
with the std.String library indexOf method.
Jacob Carlborg
2014-02-13 18:46:10 UTC
Permalink
Thanks Jacob, I just moved the import java.lang.all; down to just
before where I needed the method since that is the only method I
needed. import java.lang.all; indexOf method conflicts with the
std.String library indexOf method.
Have you imported both java.lang.all and std.string? In that case you
will most likely get conflicts. Either don't import java.lang.all
(indexOf is defined in java.lang.String) or use any of the usual
conflict resolution methods:

* alias
* fully qualified symbol
* renamed import
* selective import
--
/Jacob Carlborg
Loading...