View Bug Report
Cannot toggle comments on/off without reloading gui
Bug #: 3701
File: FuBar - QuestsFu
Date: 06-03-07 09:59 PM
By: Morac
Status: Unconfirmed
I installed Fubar-QuestsFu version r36570.1016 (from wowace) and LightHeaded and they work well together, but I was trying to find a way to show/hide the comments on the fly.

There is an option on the comments called "LightHeaded", but enabling/disabling that does absolutely nothing as far as I can tell since it displays whether it's checked or not. I can even have it unchecked at startup and the comments will still display.

I could hide the comments by unchecking the "enable" option in the comments frame, but if I re-enable it, it won't display until I reload the GUI. By the way "QuestsFu:IsModuleActive('Details')" returned true even when the Comments were supposedly disabled which means that was never really disabled to begin with.

I found that if I type this command:
/script AceLibrary("Tablet-2.0"):Open('QuestsFu_Comments')

it will re-enabling displaying the comments (even if the "enable" option was unchecked), but that seems a convoluted method to show the comments after they've been disabled.

Here's what I did. It doesn't fix the issue with the "enabled" option not actually disabling the comments module, but it let's me use the "LightHeaded" option to show/hide the comments.

First on line 53 in comments.lua, add the following to the set command for "LightHeaded" after it stores the new value into self.db.profile.lightheaded:
QuestsFu_Comments:showHideComments()

then create the function as such:

Code:
function QuestsFu_Comments:showHideComments()
	if LightHeaded and LightHeaded.IterateComments and tablet:IsRegistered('QuestsFu_Comments') then
		if self.db.profile.lightheaded then
			tablet:Open('QuestsFu_Comments')
		else
			tablet:Close('QuestsFu_Comments')
		end
	end
end

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Morac - 06-09-07 12:08 AM
The above doesn't work in the latest version of LightHeaded.