View Single Post
08-28-22, 07:04 PM   #1
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 237
Disable the Heirloom Journal

Hi all

I want to disable the Heirlooms tab button on the Collections Journal.

I have tried a number of different methods all without success.

I have tried;
Lua Code:
  1. -- hook character equipment manager button
  2.     hooksecurefunc(
  3.         "HeirloomsJournalSpellButton_OnClick",
  4.         function()
  5.             ToggleCharacter("PaperDollFrame")
  6.         end
  7.     )
and get the following error;
Lua Code:
  1. 5x IronMan\IronMan-1.0.9.15.lua:601: hooksecurefunc(): HeirloomsJournalSpellButton_OnClick is not a function
  2.         [string "=[C]"]: in function `hooksecurefunc'
  3.        [string "@IronMan\IronMan-1.0.9.15.lua"]:601: in function <IronMan\IronMan.lua:579>
  4.        [string "@IronMan\IronMan-1.0.9.15.lua"]:654: in function <IronMan\IronMan.lua:643>
  5.        
  6.        Locals:

I have also tried;
Lua Code:
  1. local functionIWantToDisable, isFunctionStillRelevant = HeirloomsJournalSpellButton_OnClick, false
  2.     function PVEFrame_ToggleFrame()
  3.         if isFunctionStillRelevant then
  4.             return functionIWantToDisable()
  5.         end
  6.     end
This throws no errors.

I have also tried to hide the HeirloomsJournal frame on show, and track the HEIRLOOMS_UPDATED event as well.
The event does not trigger on show so I can only guess it fires when we update a heirloom.

Is there a way I can achieve my goal?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote