Using the Edit.text property is not efficient for large content. Instead, use Edit:load() and Edit:save() or Edit:append().
Edit.text read/write property
Get or set the Edit text content from a string.
This property does not take into account Rich Text formatting (use Edit.richtext property instead).
Example
local ui = require "ui"
-- create a simple window
local win = ui.Window("Edit.text sample", "fixed", 340, 230)
local button = ui.Button(win, "Add text", 5, 10)
local edit = ui.Edit(win, "", button.x + button.width + 4, button.y)
-- set edit.properties
edit.font = "Segoe Script"
edit.fontsize = 16
function button:onClick()
-- not efficient, prefer to use edit:append("Hello World !")
edit.text = edit.text.."Hello World !\n"
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible