run_app = function() -- ## run: initialize clear_handlers() edit.clear(Output_editor_state) print = print_to_output -- ## run local error = eval_all() -- ## run: save some stuff, clean up the rest if error == nil then Show_code = nil else print = Real_print clear_handlers() table.insert(Output_editor_state.lines, {data=tostring(error)}) end if #Output_editor_state.lines == 0 then table.insert(Output_editor_state.lines, {data=''}) end Text.redraw_all(Output_editor_state) end