Thread Tools Display Modes
07-17-21, 11:35 PM   #1
Synsanken
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2018
Posts: 6
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.
__________________
I've been playing WoW since 2007.
  Reply With Quote
07-18-21, 12:44 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
07-18-21, 01:49 AM   #3
Synsanken
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2018
Posts: 6
That seems to be the issue.

Thanks!
__________________
I've been playing WoW since 2007.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Macro Frame

Thread Tools
Display Modes

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