Problem about setting long string in ITextCtl | developer.brewmp.com Problem about setting long string in ITextCtl | developer.brewmp.com

Developer

Problem about setting long string in ITextCtl

Forums:

I had tried to set a long unicode string as the initial value of a ITextCtl by using ITextCtl_SetText(pITextCtl,pwszText,-1) on the device of Samsung-W109.But something wierd happened.The Content of the unicode string is obviously displayed in the ITextctl's area,but it can't be edited or modified.If I pressed up or down key,the phone would die and the only way to make it awaken is to powercycle it by taking off the battery directly.
my code is like this

boolean myapp_handleEvent(myapp,ecode,wparam,dwParam)
{
if(myApp->m_textCtl && ITextCtl_isActive(myApp->m_textCtl) &&ITextCtl_HandleEvent(myApp->m_textCtl,ecode,wparam,dwparam)
return TRUE;
return FALSE;

void myApp_SetText(myApp, pwszText)
{
ITextCtl_SetProperty(myApp->m_TextCtl,MP_MULTILINE);
ITextCtl_SetMax(myApp->m_textCtl,500);
ITextCtl_SetText(myApp->m_TextCtl,pwszText);//the length of pwszText is less than 400

please help me

Did you try this, make maxsize more then double the size.

Did you try this, make maxsize more then double the size.

Does the Text you are trying to set exceeds the max size set by
ITextCtl_SetMax(myApp->m_textCtl,500);
Some devices handle that gracefully, while others would cause trouble.

Does the Text you are trying to set exceeds the max size set by
ITextCtl_SetMax(myApp->m_textCtl,500);
Some devices handle that gracefully, while others would cause trouble.

I am very sure that the unicode string does not exceeds the max size I set for the ITextCtl,and even the double of the string not.
I made another try like the following,I initiated the ITextCtl with nothing(just create it and give it a rect to show itself) ,then I kept inputing some characters one by one and eventually the phone powercycled when my input was long enough.
What a surprise!

I am very sure that the unicode string does not exceeds the max size I set for the ITextCtl,and even the double of the string not.
I made another try like the following,I initiated the ITextCtl with nothing(just create it and give it a rect to show itself) ,then I kept inputing some characters one by one and eventually the phone powercycled when my input was long enough.
What a surprise!

The same question.
I found that 228 unicode characters are ITextCtl's limit.

The same question.
I found that 228 unicode characters are ITextCtl's limit.