Quantcast
WoWInterface - View Single Post - How to show XML frame with slash command
View Single Post
04-16-21, 07:13 AM   #1
nemvokrobot
A Murloc Raider
Join Date: Feb 2021
Posts: 6
How to show XML frame with slash command

Hi

I have an XML frame:

Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
    <Script file="TestFrame.lua"/>
    <Frame name="TestFrame" parent="UIParent" frameStrata="BACKGROUND" hidden="true" setAllPoints="true">
		<Layers>
		</Layers>
        <Scripts>
            <OnLoad>
                self:RegisterEvent("PLAYER_ENTERING_WORLD");
            </OnLoad>
            <OnEvent function="Testframe_OnEvent"/>
	    <OnUpdate function="Testframe_OnUpdate"/>
        </Scripts>
    </Frame>
</Ui>
and I want to show this frame by typing "/showtest" to the chat. I've tried in LUA this way but didn't work:

Code:
local myframe = TestFrame;
SLASH_SHOWTEST1 = "/showtest"
SlashCmdList["SHOWTEST"] = function(message, editbox)
	myframe:Show();
end
any ideas who done something similar? or is it not possible to do it with an XML frame?
  Reply With Quote