Languages

Menu
Sites
Language
Displaying File data on edit area

Hi all 

i am trying to display data(7mb) of file on edit area ,
when i attempt to call  editArea.SetText(data)   emulator is hanging
my code is as follows
            EditArea  *editArea=new EditArea();
           editArea->Construct(Rectangle(0,0,700,600),INPUT_STYLE_OVERLAY,7161369);
           editArea.SetText(data);
emulator is getting hanged
can anyone figure out the issue, and also tell me the maximum limit of the text that can be passed to the edit area

Regards
Harish K
 

 

View Selected Answer

Responses

10 Replies
Alex Ashirov

Hi,
Please take a look at limitLength parameter of Tizen::Ui::Controls::EditArea::Construct() method. It should specify the maximum limit of the length of the text that can be displayed by EditArea. But anyway, if the length of the specified text exceeds the system limitation or the limit length then E_INVALID_ARG should be returned and emulator should not hang up.

harish kumar kavali

Hi alex 
     how to get the system limitations
Regards
Harish

Alex Ashirov

Hi Harish,
I don’t know. I can’t find this information. Probably it’s is limited by available memory. For example, when an application can’t construct new frame due to low memory condition then E_MAX_EXCEEDED is returned by Tizen::Ui::Controls::Frame::Construct(). This exception means: “The number of Frames and Forms exceeds the system limitation.”

Alex Dem

Hi,
just fyi,
I was able (I have got E_SUCCESS result) to set text using SetText for EditArea with String size near 200 kb with significant delay on M0 device with 2.2.1 firmware.
I did not get the response (I did not wait for, but no error message was observed still) in case of 0.5 mb string size (maybe it is possible but with huge delay).
Alexey.

Alex Ashirov

Hi,

What limitLength did you pass to Tizen::Ui::Controls::EditArea::Construct() method? I am asking because its defauly value is 1000.

Alex Dem

Hi,
I have created pEditArea->Construct(Rectangle(0,0,700,600),INPUT_STYLE_OVERLAY,7161369); like in topic's first message and I have got E_SUCCESS.
Alexey.

Alex Ashirov

Hi,

Right. I got the same results with big amount of text. It seems that the control isn’t intended for editing such long texts.

Alex Dem

Hi,
But maybe the maximum possible limit could be restricted in EditArea::Construct (inside platform) also.
Values near 0.3-0,4 mB and bigger do not make sense (on devices) because of the performance.
Alexey.

Alex Ashirov

Hi Alex,

IMHO, it's not good approach to place such amount of data into UI control. I think, it's would be better to implement some buffering and display only part of the text when required.

Mark as answer
Alex Ashirov

Hi Harish,

It seems that the control isn’t intended for editing such big texts I think, you need to implement some buffering mechanism instead of trying to display all the data at once.