Overwrite Settings Table to a Domain (xui.write)
Declaration
ok = xui.write(domain, settings)
Parameters
- domain
String. The defaults domain identifier used by the config UI. - settings
Table. Key-value pairs to write.
Returns
- ok
Boolean. true on success; false on failure.
Description
This function is used to optimize setting multiple values at once. If the config UI is currently displayed, it will immediately update the displayed values.
This function does not validate value types. If you need to ensure value types are valid, call xui.setup
after writing to validate/correct.
See the config UI standard: XUI
Examples
xui.setup('interface.xui')
local dict = xui.read('com.yourcompany.A-Script-Bundle')
dict['enabled'] = true
xui.write('com.yourcompany.A-Script-Bundle', dict)
xui.setup('interface.xui')