WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Macro Frame (https://www.wowinterface.com/forums/showthread.php?t=58845)

Synsanken 07-17-21 11:35 PM

Macro Frame
 
Hi,

For some reason, when I add the following line, it causes my addon to crash.

Code:

MacroFrame:SetScale(1.25);
It is related directly to this line, and I'm unable to figure out why. Does anyone know if Blizzard made any changes that would disable this line from working?

I have checked in game, and the following line works correctly, so I can't figure out why it's not working in my addon.

Code:

/script MacroFrame:SetScale(1.25);
Thanks.

Fizzlemizz 07-18-21 12:44 AM

The Macro editing frame is part of a Blizzard addon that is Load On Demeand ie. the MacroFrame isn't created until you type /macro. Running the script or the code in your addon before using /macro will cause an error.

You probably want to listen for the ADDON_LOADED event and if/when "Blizzard_MacroUI" is the addon loaded, then set the scale because the MacroFrame will have been created.

Synsanken 07-18-21 01:49 AM

That seems to be the issue.

Thanks! :banana:


All times are GMT -6. The time now is 04:22 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI