From the forum, by Mahe:
Hello,
I'm using a DWT 3.4 on Windows with DMD 1.028.
I have a problem with the "StyledText?" - when I input a Unicode character like "²" or "ä", the program crashes with the message:
tango.core.Exception.ArrayBoundsException@dwt.graphics.TextLayout(1937): Array index out of bounds
A sample program:
module Test;
import dwt.DWT;
import dwt.custom.StyledText;
import dwt.widgets.Display;
import dwt.widgets.Shell;
import dwt.widgets.Text;
import dwt.layout.FillLayout;
void main ()
{
Display display = new Display;
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
StyledText textField = new StyledText( shell , DWT.BORDER | DWT.V_SCROLL );
//Text textField = new Text( shell , DWT.BORDER | DWT.V_SCROLL );
shell.setText = "Hello DWT World";
shell.open;
while (!shell.isDisposed)
if (!display.readAndDispatch)
display.sleep;
display.dispose;
}
Is there a simple possibility to fix that (Like using wchar instead of char)?