www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Error: Array operations not implemented

reply Sailormoontw <sailormo tpts6.seed.net.tw> writes:
Hello:

From the converted DWT tutorial as follows:

  List list2 = new List(shell, DWT.SINGLE | DWT.BORDER);
  list2.setItems(["Rock","Paper","Scissors"]);
  list2.setBounds(110,0,50,50);
  list2.addMouseListener(new class MouseAdapter {
    public void mouseDown(MouseEvent e) {
      MessageBox.showMessage(list2.getSelection()[0] + " wins");
    }
    public void mouseUp(MouseEvent e) {
      MessageBox.showMessage("Try again!");
    }
  });

I got this message : 
testdwt.d(138): Error: Array operations not implemented

Note line 138 is the line
MessageBox.showMessage(list2.getSelection()[0] + " wins");

Thanks
Jan 24 2007
parent Sailormoontw <sailormo tpts6.seed.net.tw> writes:
Sailormoontw ¼g¨ì:

 Note line 138 is the line
 MessageBox.showMessage(list2.getSelection()[0] + " wins");
I think I know the reason. I use ~ for string concatenation, and it's fine now.
Jan 24 2007