View Bug Report
AloftOptions won't load if disabled
Bug #: 7508
File: Aloft (Beta)
Date: 08-27-11 07:27 PM
By: Cybeloras
Status: Unconfirmed
AloftOptions doesn't load if it is disabled. Sometimes I will forget to re-enable it after I shuffle around my addons. This is the function that I use for TellMeWhen's Options - maybe you will find it useful to implement into Aloft:

Code:
function TMW:LoadOptions(recursed)
	if IsAddOnLoaded("TellMeWhen_Options") then
		return true
	end
	TMW:Print(L["LOADINGOPT"])
	local loaded, reason = LoadAddOn("TellMeWhen_Options")
	if not loaded then
		if reason == "DISABLED" and not recursed then -- prevent accidental recursion
			TMW:Print(L["ENABLINGOPT"])
			EnableAddOn("TellMeWhen_Options")
			TMW:LoadOptions(1)
		else
			local err = L["LOADERROR"] .. _G["ADDON_"..reason]
			TMW:Print(err)
			geterrorhandler()(err, 0) -- non breaking error
		end
	else
		-- successfully loaded, do stuff here
	end
end

 
Stats
Files: 5
Downloads: 591,318
Favorites: 1,173

Menu
» Home



New & Updated


WOWInterface