Please say why this addon code does not hide the exp bar
NOTE: Everything else hides fine. I also tried having a "MainMenuExpBar" string in my frames_hide_list array or table or whatever but that didn't work either. I know the frame name is correct because I can do "/script MainMenuExpBar:Hide()" in game and it works. Why oh why does this not work?
frames_hide_list={"MinimapToggleButton", "GameTimeFrame", "MinimapZoomOut", "MinimapZoomIn", "MiniMapWorldMapButton"}; function HideFrames_OnLoad() MainMenuExpBar:Hide(); var=5; repeat getglobal(frames_hide_list[var]):Hide(); var = var-1; until var==0 end HideFrames_OnLoad(); |
Quote:
|
I wish I could help you with this, but seeing as how I currently can't get the default Blizzard player frame and target frame to hide.... and they pop back up every time I zone or die (which happens a lot on my alt, since she is, in fact, a holy priest :S ) I don't think I could help you much. :(
|
Quote:
|
Quote:
|
Quote:
When errors do happen, I see them. There are no errors being displayed because my addon does not cause any. That's what I meant with my above post. |
It could not work at not give off errors, Polarina. ;)
Anyway, I'm no real coder, but it looks off to me... |
Quote:
|
Quote:
|
Quote:
var=5; to: var = #frame_hide_list; |
Quote:
|
bump. still don't get why it works in game but not as a part of this addon code.
|
What is the level of the character you are trying to do that with?
Have you tried to force a MainMenuExpBar_Update(); (not sure if is protected or if it does anything)? Are you catching any Event that may cause the bar to auto-reappear (like PLAYER_XP_UPDATE, PLAYER_ENTERING_WORLD, who knows ;) ) |
Could it be that OnLoad is too soon to call that code?
Put some debug prints in that loop and check that it actually runs and the frames exist at the time it tries to run? Simplest form would be DEFAULT_CHAT_FRAME:AddMessage("message"); |
|
|
Quote:
|
Quote:
Try this: Code:
frames_hide_list={"MainMenuExpBar", "MinimapToggleButton", "GameTimeFrame", "MinimapZoomOut", "MinimapZoomIn", "MiniMapWorldMapButton"}; |
Thanks a lot, there seems to be some new stuff there for me to look up and learn about.
|
All times are GMT -6. The time now is 11:31 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI