Thread Tools Display Modes
04-20-14, 02:23 PM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Guild Bank issue

Hi, I am trying to hide the emblem of the guild bank frame called "GuildBankEmblemFrame" but it does not recognise the frame name so I looked at Blizzards code at: http://wowprogramming.com/utils/xmlb...uildBankUI.lua

And thought I could do this:

Lua Code:
  1. hooksecurefunc("GuildBankFrame_OnLoad", function()
  2.     GuildBankEmblemFrame:Hide()
  3. end)

But I get: hooksecurefunc(): GuildBankFrame_OnLoad is not a function

This is probably an obvious problem I am causing but does anyone know how I can do this? Thanks!

Last edited by Mayron : 04-20-14 at 03:11 PM.
  Reply With Quote
04-20-14, 03:11 PM   #2
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
The guild bank ui is loaded on demand. You can't hook the function before the addon is loaded.

Don't know if it's possible to load it via http://wowprogramming.com/docs/api/LoadAddOn?

Or you could wait for http://wowprogramming.com/docs/event...NKFRAME_OPENED and hide the frame/hook the function then.

Last edited by Duugu : 04-20-14 at 03:14 PM.
  Reply With Quote
04-20-14, 03:12 PM   #3
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Duugu View Post
The guild bank ui is loaded on demand.

Don't know if it's possible to load it via http://wowprogramming.com/docs/api/LoadAddOn?
Thanks that worked! I'm trying to remove the texture being used on the GuildBankFrame but I do not know much about how this is done. Any idea on how I would do this?
Thanks!

Last edited by Mayron : 04-20-14 at 03:19 PM.
  Reply With Quote
04-20-14, 03:38 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Don't force Blizz's guild bank addon to load. That may cause all sorts of problems. There are two ways to do this correctly.

1. If your addon deals only with the guild bank and it can be loaded on demand like the guild bank UI is, then put this in your addon's TOC file:
Code:
## LoadOnDemand: 1
## LoadWith: Blizzard_GuildBankUI
2. Register for the "ADDON_LOADED" event and listen for when the Blizzard_GuildBankUI addon is enabled and ready.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-21-14, 02:59 AM   #5
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Seerah View Post
Don't force Blizz's guild bank addon to load. That may cause all sorts of problems. There are two ways to do this correctly.

1. If your addon deals only with the guild bank and it can be loaded on demand like the guild bank UI is, then put this in your addon's TOC file:
Code:
## LoadOnDemand: 1
## LoadWith: Blizzard_GuildBankUI
2. Register for the "ADDON_LOADED" event and listen for when the Blizzard_GuildBankUI addon is enabled and ready.
I thought of this myself and did option 2 but thank you. I agree, forcing it to load sounded like a bad idea but did not really think that it could actually cause problems. I only want this addOn to perform its skinning functions when it loads itself any way
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Guild Bank issue


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off