Wrong page name Edit

This page seems to be only about the secure action button template, not about all secure frames -watchout 11:29, 12 September 2007 (UTC)


I don't know if it's a problem with my code or what, but I couldn't get this to work:

frame:SetAttribute("type", "macro")			
frame:SetAttribute("macrotext", macrotextvar)

I had to do it like this:

frame:SetAttribute("type", "macro")			
frame:SetAttribute("macro", false)
frame:SetAttribute("macrotext", macrotextvar)

Posted by: EGingell (T|C|F) on 09:10, 15 November 2007 (UTC)

HRm... I use macrotext the way you describe in the first example in more than one addon... might have to doublecheck they still work. Perhaps the frame you're modifying already had the "macro" attribute set? TeжubԎ Ҩ Ѡ 09:17, 15 November 2007 (UTC)
The frame was created on the fly. I can't, for the life of me, figure out where the problem is. When I clicked on said button, it fired RunMacro() with "" instead of the "macrotext" attribute. I tried changing the name of the property from "" to "frame.title" and it still tried to fire RunMacro() with the same frickin' value. The only thing that I can think of is that, somehow, somewhere, frame:SetAttribute("macro", whatever) was being called implicitly and, since FrameXML\SecureTemplates.lua checks for the "macro" attribute first, my "macrotext" wouldn't ever fire. Posted by: EGingell (T|C|F) on 09:51, 15 November 2007 (UTC)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.