<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3AClassgenerator%2Fparameter%2Fclass</id>
	<title>Modul:Classgenerator/parameter/class - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3AClassgenerator%2Fparameter%2Fclass"/>
	<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=Modul:Classgenerator/parameter/class&amp;action=history"/>
	<updated>2026-04-05T21:50:46Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Verzauberte Welten e.V.</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.verzauberte-welten.de/index.php?title=Modul:Classgenerator/parameter/class&amp;diff=4406&amp;oldid=prev</id>
		<title>imported&gt;Oetterer am 8. August 2018 um 05:52 Uhr</title>
		<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=Modul:Classgenerator/parameter/class&amp;diff=4406&amp;oldid=prev"/>
		<updated>2018-08-08T05:52:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local FoundationClass = require('Module:Foundationclass')&lt;br /&gt;
local ClassDebug = require('Module:Debug/class')&lt;br /&gt;
&lt;br /&gt;
-- ****************************************************************&lt;br /&gt;
-- *                         inheritance                          *&lt;br /&gt;
-- ****************************************************************&lt;br /&gt;
local ClassgeneratorParameter = FoundationClass:subclass('ClassgeneratorParameter')&lt;br /&gt;
-- setting class's configuration data&lt;br /&gt;
ClassgeneratorParameter.static.myConfiguration = mw.loadData('Module:Classgenerator/parameter/config')&lt;br /&gt;
ClassgeneratorParameter.static.SFfieldConfig = mw.loadData('Module:SFfield/config')&lt;br /&gt;
--ClassgeneratorParameter.static.myConfiguration = require('Module:Classgenerator/parameter/config')&lt;br /&gt;
--local SFfieldConfig = mw.loadData('Module:SFfield/config')&lt;br /&gt;
--ClassgeneratorParameter.static.myConfiguration.parameter.input_type.values = SFfieldConfig.validInputTypes	-- cant load a table from another config in my config. therefor this&lt;br /&gt;
--ClassgeneratorParameter.static.myConfiguration.parameter.base_type.values = SFfieldConfig.validInputTypes	-- cant load a table from another config in my config. therefor this&lt;br /&gt;
--   being in a static method, use self.myConfiguration&lt;br /&gt;
--   being in a private method, that knows self or in a public method, use self.class.myConfiguration&lt;br /&gt;
&lt;br /&gt;
-- ****************************************************************&lt;br /&gt;
-- *                          properties                          *&lt;br /&gt;
-- ****************************************************************&lt;br /&gt;
&lt;br /&gt;
-- **************** initialization of table for private properties&lt;br /&gt;
local _private = setmetatable({}, {__mode = 'k'})   -- weak table storing all private attributes&lt;br /&gt;
&lt;br /&gt;
-- **************** declaration of public static properties&lt;br /&gt;
-- ClassgeneratorParameter.static.myPropertyModule = require('Module:extern')&lt;br /&gt;
-- ClassgeneratorParameter.static.staticProperty = ' '&lt;br /&gt;
&lt;br /&gt;
-- remember the static classes provided by Foundationclass:&lt;br /&gt;
-- ClassgeneratorParameter.globalConfig&lt;br /&gt;
-- ClassgeneratorParameter.myCargoUtil&lt;br /&gt;
-- ClassgeneratorParameter.myTableTools&lt;br /&gt;
&lt;br /&gt;
-- **************** declaration of (global) private properties&lt;br /&gt;
-- for properties you should rather use constructor and _private[self]. this only, if you need a private class property&lt;br /&gt;
-- you should, however predeclare private methods here&lt;br /&gt;
local _debug	-- private method declared later&lt;br /&gt;
local _privateMethodAhead	-- declaration ahead, so this private method can be used in the constructor and in other private methods&lt;br /&gt;
&lt;br /&gt;
-- ***************************************************************&lt;br /&gt;
-- *                           methods                           *&lt;br /&gt;
-- ***************************************************************&lt;br /&gt;
 &lt;br /&gt;
-- **************** declaration of static methods&lt;br /&gt;
function ClassgeneratorParameter:initialize(uid)&lt;br /&gt;
	local _CFG = self.class.myConfiguration&lt;br /&gt;
	FoundationClass.initialize(self, uid)&lt;br /&gt;
	_private[self] = {&lt;br /&gt;
		dbg = ClassDebug:new(tostring(self.class) .. ': id ' .. uid),&lt;br /&gt;
	}&lt;br /&gt;
	_debug(self, 1, ' ClassgeneratorParameter: done initializing object &amp;amp;quot;' .. uid ..'&amp;amp;quot;, from ' .. tostring(self))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- use use self.myConfiguration to access your configuration in a static method&lt;br /&gt;
function ClassgeneratorParameter.static:aStaticMethod(var)&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter.static:aStaticMethod() to do something, from ' .. tostring(self))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter.static:mySfDynamicFieldAttribute(fieldname, attribute, value)&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter.static:mySfDynamicFieldAttribute(fieldname, attribute, value), from ' .. tostring(self))&lt;br /&gt;
	_debug(self, 2, ' with parameters &amp;amp;quot;' .. fieldname .. '&amp;amp;quot;, &amp;amp;quot;' .. attribute .. '&amp;amp;quot; and a ' .. type(value) .. ' value')&lt;br /&gt;
	-- function that can process any attribute/value pair just before rendering the semantic forms field&lt;br /&gt;
	-- usually done, to generate a dynamic 'default' value&lt;br /&gt;
	-- keep in mind: you can completely disable a form field, if you return true on attribute &amp;quot;disable&amp;quot;. note however, that this causes the field to not show at all, no data will be transported/saved&lt;br /&gt;
	local val = value&lt;br /&gt;
	if FoundationClass.globalConfig.dataStore ~= 'cargo' and FoundationClass.globalConfig.dataStore ~= 'both' then&lt;br /&gt;
		-- disable all cargo fields&lt;br /&gt;
		if fieldname == 'cargo' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'cargo_hidden' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'cargo_size' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'cargo_type' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'add_cargo_table_and_field' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'mapping_cargo_field' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'mapping_cargo_table' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if FoundationClass.globalConfig.dataStore ~= 'smw' and FoundationClass.globalConfig.dataStore ~= 'both' then&lt;br /&gt;
		-- disable all smw fields&lt;br /&gt;
		if fieldname == 'property' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'property_name' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'property_type' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'unique_for_concept' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'mapping_property' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
		if fieldname == 'values_from_concept' and attribute == 'disable' then&lt;br /&gt;
			val = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if fieldname == 'property_name' and attribute == 'values_from_namespace' then&lt;br /&gt;
		local ret, nulProperty = pcall(mw.title.new, 'NUL', 'Property')&lt;br /&gt;
		val = ret and mw.site.namespaces[nulProperty.namespace].name or 'NUL'&lt;br /&gt;
	end&lt;br /&gt;
	if fieldname == 'property_type' and attribute == 'values' then&lt;br /&gt;
		val = FoundationClass.globalConfig.smwPropertyTypesAvailable&lt;br /&gt;
	end&lt;br /&gt;
	if fieldname == 'input_type' and attribute == 'show_on_select' then&lt;br /&gt;
		-- build input type's show on select from SFfieldConfig.validAttributesPerType, except remove values and replace all spaces in attribute names by an underscore&lt;br /&gt;
		--val = mw.clone(ClassgeneratorParameter.SFfieldConfig.validAttributesPerType)&lt;br /&gt;
		--val = ClassgeneratorParameter.myTableTools.shallowClone(ClassgeneratorParameter.SFfieldConfig.validAttributesPerType)&lt;br /&gt;
		val = {}&lt;br /&gt;
		for param, attrlist in pairs(ClassgeneratorParameter.SFfieldConfig.validAttributesPerType) do&lt;br /&gt;
			if not val[param] then&lt;br /&gt;
				val[param] = {}&lt;br /&gt;
			end&lt;br /&gt;
			for k, attr in pairs(attrlist) do&lt;br /&gt;
				if attr ~= 'values' then&lt;br /&gt;
					val[param][k] = mw.ustring.gsub(attr, ' ', '_')&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		_debug(self, 2, ' calculated this monster: &amp;lt;pre&amp;gt;' .. ClassgeneratorParameter.myTableTools.printTable(val) .. '&amp;lt;/pre&amp;gt;')&lt;br /&gt;
	end&lt;br /&gt;
	if fieldname == 'input_type' and attribute == 'values' then&lt;br /&gt;
		return ClassgeneratorParameter.SFfieldConfig.validInputTypes&lt;br /&gt;
	end&lt;br /&gt;
	if fieldname == 'base_type' and attribute == 'values' then&lt;br /&gt;
		return ClassgeneratorParameter.SFfieldConfig.validInputTypes&lt;br /&gt;
	end&lt;br /&gt;
	if fieldname == 'uploadable' and attribute == 'show_on_select' then&lt;br /&gt;
		val = {}&lt;br /&gt;
		val['true'] = {'default_filename', 'image_preview'}&lt;br /&gt;
	end&lt;br /&gt;
	_debug(self, 3, '  returning ' .. (type(val) == 'boolean' and (val and 'true' or 'false') or type(val)))&lt;br /&gt;
	return val	-- this value will be used as new value for field's attribute&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter.static:sfGenerateForm(embedIn)&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter.static:sfGenerateForm()')&lt;br /&gt;
	local _CFG = self.myConfiguration&lt;br /&gt;
	local embedIn = embedIn or 'Classgenerator[parameter_parameter]'&lt;br /&gt;
	local tagStart = '{{{'&lt;br /&gt;
	local tagEnd = '}}}'&lt;br /&gt;
	-- create the table&lt;br /&gt;
	-- start the html object&lt;br /&gt;
	html = mw.html.create('')&lt;br /&gt;
	html:wikitext(tagStart .. 'for template|' .. _CFG.template.name .. '|label=' .. _CFG.global.entityTitle ..&lt;br /&gt;
		'|embed in field=' .. embedIn .. '|multiple|add button text=' .. _CFG.form.labelCreate .. '|minimum instances=1' .. tagEnd)&lt;br /&gt;
		:node(self:sfGenerateFormTable(self.myConfiguration.form.fieldOrderGeneral))&lt;br /&gt;
		:newline()&lt;br /&gt;
		:wikitext(':')&lt;br /&gt;
		:node(self:sfGenerateFormTable(self.myConfiguration.form.fieldOrderSFgeneral, 'row_parameter'))&lt;br /&gt;
		:newline()&lt;br /&gt;
		:wikitext('::')&lt;br /&gt;
		:node(self:sfGenerateFormTable(self.myConfiguration.form.fieldOrderSFtypeDependent))&lt;br /&gt;
		:wikitext(tagStart .. 'end template' .. tagEnd)&lt;br /&gt;
		:newline()&lt;br /&gt;
	return tostring(html)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- **************** declaration of private methods&lt;br /&gt;
-- use self.class.myConfiguration to access your configuration in a public or a private method that is called by a public method&lt;br /&gt;
_debug = function (self, level, text)&lt;br /&gt;
	if _private[self] and _private[self].dbg then&lt;br /&gt;
		_private[self].dbg:log(level, text)&lt;br /&gt;
	else&lt;br /&gt;
		ClassDebug:log(level, text, tostring(self) .. '.static')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local _processAttribute = function (self, attr, indent)&lt;br /&gt;
	_debug(self, 1, 'entering private _processAttribute() to print a line for attribute ' .. attr .. ', from ' .. tostring(self))&lt;br /&gt;
	local coreData = self:getCoreData()&lt;br /&gt;
	local ret = ''&lt;br /&gt;
	local omissionList = {'name'}&lt;br /&gt;
	local attr = attr&lt;br /&gt;
	local val = coreData[attr]&lt;br /&gt;
	if type(val) == 'boolean' then&lt;br /&gt;
		val = val and 'true' or 'false'&lt;br /&gt;
	end&lt;br /&gt;
	if val and not ClassgeneratorParameter.myTableTools.inTable(omissionList, attr) then&lt;br /&gt;
		ret = indent .. attr .. ' = '&lt;br /&gt;
		if type(val) == 'table' then&lt;br /&gt;
			ret = ret .. ClassgeneratorParameter.myTableTools.printTable(val, 'inline')&lt;br /&gt;
		elseif val == 'true' or val == 'false' or attr == 'cargo_table' or (attr == 'restricted' and (val == 'global.restrictedTo' or val == 'superglobal.restrictedTo')) or mw.ustring.match(val, '^[0-9]+$') then&lt;br /&gt;
			ret = ret .. val&lt;br /&gt;
		else&lt;br /&gt;
			local valMangled = mw.text.trim(val)&lt;br /&gt;
			valMangled = mw.ustring.gsub(mw.ustring.gsub(valMangled, &amp;quot;\\'&amp;quot;, &amp;quot;'&amp;quot;), &amp;quot;'&amp;quot;, &amp;quot;\\'&amp;quot;)&lt;br /&gt;
			valMangled = mw.ustring.gsub(valMangled, '\n', '\\n\' ..\n' .. indent .. '\t\'')&lt;br /&gt;
			ret = ret .. &amp;quot;'&amp;quot; .. valMangled .. &amp;quot;'&amp;quot;	-- the gsub catches multiline input from textareas&lt;br /&gt;
		end&lt;br /&gt;
		ret = ret .. ','&lt;br /&gt;
		if self.class.myConfiguration.template.addCommentsToConfig then&lt;br /&gt;
			ret = ret .. '\t-- ' .. self.class.myConfiguration.parameter[attr].description&lt;br /&gt;
		end&lt;br /&gt;
		ret = ret .. '\n'&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local _privateMethod = function (self)&lt;br /&gt;
	_debug(self, 1, 'entering private _privateMethod() to do something, from ' .. tostring(self))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- **************** declaration of public methods&lt;br /&gt;
-- use self.class.myConfiguration to access your configuration in a public method&lt;br /&gt;
function ClassgeneratorParameter:addInfobox()&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter:addInfobox(), from ' .. tostring(self))&lt;br /&gt;
	if self:goodToGo() then&lt;br /&gt;
		local _CFG = self.class.myConfiguration&lt;br /&gt;
		local coreData = self:getPrivate('coreData')&lt;br /&gt;
		local ib_args = {&lt;br /&gt;
			bodyclass = 'infobox_name',&lt;br /&gt;
			aboveclass = 'objtitle titletext',&lt;br /&gt;
			headerclass = 'headertext',&lt;br /&gt;
			labelstyle = 'width: 30%;',&lt;br /&gt;
			datastyle = 'width: 70%;',&lt;br /&gt;
			title = self:getPrivate('uid'),&lt;br /&gt;
			subheader = nil,&lt;br /&gt;
			label1 = _CFG.parameter.name.label,&lt;br /&gt;
			data1 = coreData.name and coreData.name or '',&lt;br /&gt;
			header1 = nil,&lt;br /&gt;
		}&lt;br /&gt;
		self:addOutput(require('Module:Infobox').infobox(ib_args))&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter:addPageBody()&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter:addPageBody(), from ' .. tostring(self))&lt;br /&gt;
	_debug(self, 2, ' rendering errors and warnings and adding them to output')&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	self:addOutput(self:renderErrors())&lt;br /&gt;
	self:addOutput(self:renderWarnings())&lt;br /&gt;
	if self:goodToGo() then&lt;br /&gt;
		self:addOutput('No out put yet')&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter:myArgumentProcessing(coreData)&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter:myArgumentProcessing(args) to process coreData, from ' .. tostring(self))&lt;br /&gt;
	-- function that performs some individual transformation args --&amp;amp;amp;gt; coreData&lt;br /&gt;
	local coreData = coreData&lt;br /&gt;
	-- if dataStore == 'cargo' set sf_cargo_table and sf_cargo_field&lt;br /&gt;
	if (FoundationClass.globalConfig.dataStore == 'cargo' or FoundationClass.globalConfig.dataStore == 'both') and FoundationClass.myYesno(coreData.cargo) and FoundationClass.myYesno(coreData.add_cargo_table_and_field) then&lt;br /&gt;
		coreData.cargo_table = 'global.cargoTable'&lt;br /&gt;
		coreData.cargo_field = coreData.name&lt;br /&gt;
	end&lt;br /&gt;
	coreData.add_cargo_table_and_field = nil&lt;br /&gt;
	if (FoundationClass.globalConfig.dataStore == 'smw' or FoundationClass.globalConfig.dataStore == 'both') and FoundationClass.myYesno(coreData.property) then&lt;br /&gt;
		coreData.property_name = mw.ustring.gsub(mw.ustring.gsub(coreData.property_name, ' ', '_'), mw.site.namespaces[mw.title.new('Nul', 'Property').namespace].name .. ':', '')&lt;br /&gt;
	else&lt;br /&gt;
		coreData.property_name = nil&lt;br /&gt;
		coreData.property_type = nil&lt;br /&gt;
	end&lt;br /&gt;
	if coreData.sf and mw.ustring.lower(coreData.sf) == 'holds template' then&lt;br /&gt;
		coreData.sf = 'yes'&lt;br /&gt;
		coreData.holds_template = 'true'&lt;br /&gt;
	end&lt;br /&gt;
	if coreData.show_on_select and type(coreData.show_on_select) == 'table' then&lt;br /&gt;
		local sos = {}&lt;br /&gt;
		for _, selector in pairs(coreData.show_on_select) do&lt;br /&gt;
			local value, field = mw.ustring.match(selector, '^([^=]+)%s*=%s*(.+)$')&lt;br /&gt;
			if value and field then&lt;br /&gt;
				if mw.ustring.match(value, ' ') then&lt;br /&gt;
					value = '[\'' .. value .. '\']'&lt;br /&gt;
				end&lt;br /&gt;
				if not sos[value] then&lt;br /&gt;
					sos[value] = {}&lt;br /&gt;
				end&lt;br /&gt;
				table.insert(sos[value], field)&lt;br /&gt;
			elseif coreData.input_type == 'checkbox' or selector == 'false' then&lt;br /&gt;
				table.insert(sos, mw.text.trim(selector))&lt;br /&gt;
			else&lt;br /&gt;
				self:addError('Error processing value for \'\'' .. self.class.myConfiguration.parameter.show_on_select.label .. '\'\': ' .. &lt;br /&gt;
					ClassgeneratorParameter.myTableTools.printTable(coreData.show_on_select) .. ' on entry :' .. mw.text.encode(selector))&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		coreData.show_on_select = sos&lt;br /&gt;
		--coreData.show_on_select = FoundationClass.myTableTools.printTable(sos)&lt;br /&gt;
		--coreData.show_on_select = FoundationClass.myTableTools.printTable(coreData.show_on_select)&lt;br /&gt;
	end&lt;br /&gt;
	-- kill two cosmetical switches&lt;br /&gt;
	coreData.cargo = nil&lt;br /&gt;
	coreData.property = nil&lt;br /&gt;
	return coreData	-- this is your new coreData.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter:myPlausibilityTest(args)&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter:myPlausibilityTest(args) to test arguments, from ' .. tostring(self))&lt;br /&gt;
	local _CFG = self.class.myConfiguration&lt;br /&gt;
	-- function that performs the individual plausibility tests&lt;br /&gt;
	-- note: before you access a field args.fieldname you should check for existance&lt;br /&gt;
	-- self:addError(text)&lt;br /&gt;
	if args.name and not mw.ustring.match(args.name, '^[a-zA-Z_][0-9a-zA-Z_-]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.name.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(args.name)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	if args.cargo_size and not mw.ustring.match(args.cargo_size, '^[0-9]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.cargo_size.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(args.cargo_size)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	if args.cols and not mw.ustring.match(args.cols, '^[0-9]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.cols.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(args.cols)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	if args.max_values and not mw.ustring.match(args.max_values, '^[0-9]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.max_values.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(args.max_values)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	if args.maxlength and not mw.ustring.match(args.maxlength, '^[0-9]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.maxlength.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(args.maxlength)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	if args.rows and not mw.ustring.match(args.rows, '^[0-9]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.rows.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(args.rows)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	if args.size and not mw.ustring.match(args.size, '^[0-9]*$') then&lt;br /&gt;
		self:addError('Invalid value detected for parameter &amp;lt;i&amp;gt;' .. _CFG.parameter.size.label .. ':&amp;lt;/i&amp;gt; &amp;quot;' .. mw.text.encode(tostring(size.cols)) .. '&amp;quot;')&lt;br /&gt;
	end&lt;br /&gt;
	return false	-- return value will be ignored. but if you add any error, the object's initialization will fail with the error&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter:myStashAdjustments(stash)&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter:myStashAdjustments(stash) to do some minor adjustments on data before storing, from ' .. tostring(self))&lt;br /&gt;
	-- function that alters the stash before storing the data&lt;br /&gt;
	local stash = stash&lt;br /&gt;
	return stash	-- this is your new stash. this will be stored. it has format (fieldname: value)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function ClassgeneratorParameter:render()&lt;br /&gt;
	_debug(self, 1, 'entering ClassgeneratorParameter:render() to render the code I pass to template class generator, from ' .. tostring(self))&lt;br /&gt;
	local str = ''&lt;br /&gt;
	if self:goodToGo() then&lt;br /&gt;
		local _CFG = self.class.myConfiguration&lt;br /&gt;
		local coreData = self:getCoreData()&lt;br /&gt;
		local indent = '\t'&lt;br /&gt;
		local sfAttributes = {}&lt;br /&gt;
		for _, val in pairs(_CFG.form.fieldOrderSFgeneral) do&lt;br /&gt;
			table.insert(sfAttributes, val)&lt;br /&gt;
		end&lt;br /&gt;
		for _, val in pairs(_CFG.form.fieldOrderSFtypeDependent) do&lt;br /&gt;
			table.insert(sfAttributes, val)&lt;br /&gt;
		end&lt;br /&gt;
		table.sort(sfAttributes)&lt;br /&gt;
		if FoundationClass.myYesno(coreData.sf, true) then&lt;br /&gt;
			str = str .. coreData.name&lt;br /&gt;
		end&lt;br /&gt;
		str = str .. _CFG.template.delimiterFormFieldName&lt;br /&gt;
		str = str .. indent .. coreData.name .. ' = {\n'&lt;br /&gt;
		for _, globalAttr in pairs(_CFG.form.fieldOrderGeneral) do&lt;br /&gt;
			if globalAttr ~= 'sf' then&lt;br /&gt;
				str = str .. _processAttribute(self, globalAttr, indent .. '\t')&lt;br /&gt;
			elseif coreData.sf ~= 'Information' then&lt;br /&gt;
				local sf = ''&lt;br /&gt;
				sf = sf .. _processAttribute(self, 'cargo_table', indent .. '\t\t')&lt;br /&gt;
				sf = sf .. _processAttribute(self, 'cargo_field', indent .. '\t\t')&lt;br /&gt;
				for _, sfAttr in pairs(sfAttributes) do&lt;br /&gt;
					sf = sf .. _processAttribute(self, sfAttr, indent .. '\t\t')&lt;br /&gt;
				end&lt;br /&gt;
				if mw.ustring.len(sf) &amp;gt; 0 then&lt;br /&gt;
					str = str .. indent .. '\t' .. 'sf = {\n' .. sf .. indent .. '\t' .. '},\n'&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		str = str .. indent .. '},\n' .. _CFG.template.delimiterResult&lt;br /&gt;
	else&lt;br /&gt;
		str = tostring(self:renderErrors())&lt;br /&gt;
	end&lt;br /&gt;
	return str&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return ClassgeneratorParameter&lt;/div&gt;</summary>
		<author><name>imported&gt;Oetterer</name></author>
	</entry>
</feed>