If you perform the following actions /load thisaddon > /reload thisaddon > /reload thisaddon, then the edit state from the before the addon was reloaded will persist once you start typing in the box again.
local ui = require('core.ui')
local edit_state = ui.edit_state()
edit_state.text = 'Edit me!'
ui.display(function()
ui.window(window_state, function(layout)
layout:size(200,100):edit(edit_state)
layout:size(200,100):label(edit_state.text)
end)
end)
If you perform the following actions
/load thisaddon
>/reload thisaddon
>/reload thisaddon
, then the edit state from the before the addon was reloaded will persist once you start typing in the box again.