Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

WoWInterface » Developer Discussions » Lua/XML Help » How to show XML frame with slash command


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