main.lua:
local ui = require "ui"
require "./widgets/Editor"
local win = ui.Window("")
local Edit = ui.Editor(win, "", 0, 0)
win:show()
ui.run(win):wait()
Editor.lua:
local ui = require "ui"
Editor = Object(ui.Edit)
function Editor:constructor(parent, text, ...)
local Edit = ui.Edit.constructor(self, parent, {}, ...)
Edit.font = "Consolas"
Edit.fontsize = 11*ui.dpi
Edit.rtf = false
Edit.border = false
return Edit
end
i got runtime error: attempt to call nil value(field 'Editor')