digitalmars.D.dwt - Error: undefined identifier ArrayWrapperString
- JohnnyK (23/23) Feb 07 2014 I am getting the following error when trying to use the clipboard
- Jacob Carlborg (7/14) Feb 07 2014 It's not part of SWT. It's a utility typed added by DWT. It's has most
- JohnnyK (5/23) Feb 13 2014 Thanks Jacob, I just moved the import java.lang.all; down to
- Jacob Carlborg (11/15) Feb 13 2014 Have you imported both java.lang.all and std.string? In that case you
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.
Feb 07 2014
On 2014-02-07 19:55, JohnnyK wrote: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
Feb 07 2014
On Friday, 7 February 2014 at 20:39:40 UTC, Jacob Carlborg wrote:On 2014-02-07 19:55, JohnnyK wrote: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.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.
Feb 13 2014
On 2014-02-13 16:45, JohnnyK wrote: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
Feb 13 2014