FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

StyledText and Unicode

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
Mahe



Joined: 23 Mar 2008
Posts: 4

PostPosted: Sun May 18, 2008 8:21 am    Post subject: StyledText and Unicode Reply with quote

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:
Code:

tango.core.Exception.ArrayBoundsException@dwt.graphics.TextLayout(1937): Array index out of bounds

A sample program:
Code:

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)?
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Mon May 19, 2008 3:31 am    Post subject: Reply with quote

StyledText is one of more complicated things to port, because of the char[]/wchar[] mix.
I did not yet look into that, but i would guess that it is a bug, that will take me some time.

I added your request as a ticket. Thanks for your report.

Please use the DWT newsgroup instead of this forum. I check here for new messages very seldom.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group