View Single Post
08-04-14, 07:26 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I would guess you're experiencing this problem because you're trying to open the Interface Options window in the main chunk, when nothing is really initialized yet. Normal addons do not do that, which is (probably) why they don't run into the same problem. Try triggering your test with a slash command that you run after you're fully logged in:

Code:
SLASH_TRUTHTEST1 = "/truthtest"
SlashCmdList.TRUTHTEST = function()
	if ( not InterfaceOptionsFrame:IsShown() ) then
		InterfaceOptionsFrame:Show();
	end
	InterfaceOptionsFrame_OpenToCategory("Truth2")
	--CensusPlusSetCheckButtonState()
end
(I left the last line commented since that function isn't defined in the code you posted.)

Also, reading your code full of generic globals rather made me want to gouge my eyes out with onion slices.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote