-function DynamicList.write(self, ...)
- self.map.proceed = true
- return AbstractValue.write(self, ...)
+function DynamicList.write(self, section, value)
+ local t = { }
+
+ if type(value) == "table" then
+ local x
+ for _, x in ipairs(value) do
+ if x and #x > 0 then
+ t[#t+1] = x
+ end
+ end
+ else
+ t = { value }
+ end
+
+ if self.cast == "string" then
+ value = table.concat(t, " ")
+ else
+ value = t
+ end
+
+ return AbstractValue.write(self, section, value)
+end
+
+function DynamicList.cfgvalue(self, section)
+ local value = AbstractValue.cfgvalue(self, section)
+
+ if type(value) == "string" then
+ local x
+ local t = { }
+ for x in value:gmatch("%S+") do
+ if #x > 0 then
+ t[#t+1] = x
+ end
+ end
+ value = t
+ end
+
+ return value