I want to display a file inside a cl_gui_textedit
component with line breaks which causes me problems.
I am using the following code to initialize the component
DATA: lo_c_errorviewer TYPE REF TO cl_gui_custom_container.
CREATE OBJECT lo_c_errorviewer
EXPORTING
container_name = 'C_ERROR_MSG'.
CREATE OBJECT go_error_textedit
EXPORTING parent = lo_c_errorviewer.
go_error_textedit->set_toolbar_mode( 0 ).
go_error_textedit->set_statusbar_mode( 0 ).
After some XML processing with the iXML package the binary data of the file is available like this:
types: begin of xml_line,
data(256) type x,
end of xml_line.
data: xml_table type table of xml_line,
xml_size type i.
ostream = streamFactory->create_ostream_itable( xml_table ).
document->render( ostream = ostream recursive = 'X' ).
xml_size = ostream->get_num_written_raw( ).
This should contain line breaks if I am right. The ostream object has "pretty printing" turned on by default.
I searched the reference and the only way to pass the information is via
call method <c_textedit_control> - > set_text_as_stream
which expects a "Standard Table" of characters. How do I convert the data or pass it to the component?