All pastes #123991 Raw Edit

Something

public lua v1 · immutable
·published 2006-08-09 19:06 UTC
rendered paste body
AceDBtest = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceHook-2.0", "AceDB-2.0", "AceConsole-2.0")local AceOO = AceLibrary("AceOO-2.0")local print = function(msg) if msg then DEFAULT_CHAT_FRAME:AddMessage(msg) end end-- SYSTEMfunction AceDBtest:OnInitialize()	self:RegisterDB("AceDBtestDB")		local DEFAULT_OPTIONS = {		table1 = {1,2,3,4,5,6,7,8},		table2 = {9,10,11,12,13,14,15,16}		}	self:RegisterDefaults('profile', DEFAULT_OPTIONS)		print("ACEDBtest------")	self:TheTruth()endfunction AceDBtest:TheTruth()	print("I will now print out what the two tables contain")	for k,v in self.db.profile do		if type(v) == "table" then			print(k.."::")			local string = ""			for k1,v1 in v do				string = string.." "..v1			end			print(string)		end	end	print("--")	print("--")		print("use the function AceDBtest:RemoveLine(string) to test the bug. Argument can be 'table1' or 'table2'.")endfunction AceDBtest:RemoveLine(string)	table.remove(self.db.profile[string],table.getn(self.db.profile[string]))	self:TheTruth()	print("now, try to do a reloadui and see if your change to the table is saved.")end