Thread Tools Display Modes
04-26-06, 07:15 AM   #1
EricStratton
A Defias Bandit
Join Date: Apr 2006
Posts: 2
Modifying an Existing Frame

Hello all.

I've looked though the forums here and elsewhere and it seems that the problem I'm having is common but I have yet to find an answer. It's basically the same problem that the person a couple threads below is having regarding modifying the tradeskill window. I am trying to add a button to the Auction House Browse frame but instead the button appears in the upper right hand corner of the main WoW window and I can't figure out what I'm doing wrong. I thought making the parent of the button "AuctionBrowseFrame" (the name I got from the Blizzard_AuctionUI.xml file) would do it, but apparently it's not.

Any help would be greatly appreciated.

TestAddon.xml:
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/">
	<Script file="TestAddon.lua"/>
	<Button name="TestAddon_Button" parent="AuctionBrowseFrame" inherits="UIPanelButtonTemplate" text="TESTADDON_BUTTON" hidden="false">
	    <Size>
	        <AbsDimension x="120" y="25" /> 
	    </Size>
	    <Anchors>
	        <Anchor point="TOPRIGHT">
	            <Offset>
	                <AbsDimension x="23" y="-100" /> 
	            </Offset>
	        </Anchor>
	    </Anchors>
	    <Scripts>
	        <OnClick>
	        	TestAddon_OnClick();
	        </OnClick> 
	    </Scripts>
	</Button>
</Ui>
TestAddon.toc:
Code:
## Interface: 11000
## Author: 
## Title: TestAddon
## Notes: 
## Version : 0.1
..\Blizzard_AuctionUI\Blizzard_AuctionUI.xml
TestAddon.xml
TestAddon.lua (the button press works):
Code:
-- TestAddon.Version="0.1";

function TestAddon_OnLoad()
end

function TestAddon_OnClick()
	message("Hello WoW");
end
  Reply With Quote
04-26-06, 11:47 AM   #2
EricStratton
A Defias Bandit
Join Date: Apr 2006
Posts: 2
Follow up:

I got some help from Iriel on the official WoW UI boards. I needed to make my mod load on demand and also have it load with the Auction UI. Also I'm mildly retarded and had the parent frame name wrong. It's "AuctionFrameBrowse" and not "AuctionBrowseFrame". Those together solved my problem.

So I've got the button showing up where I want it now. /cheer. But now when the mod loads I get some errors. I've disabled all of my other mods so I'm sure I'm causing this problem. I thought they were caused b/c I defined a button with no frame. So I tried defining a frame around the button and, while the button still appears where I want it to, it didn't resolve the error.

Any help is appreciated:

Count: Infinite
Error: Interface\FrameXML\MoneyFrame.lua:152: attempt to concatenate local `frameName' (a nil value)

--------------------------------------------------

Count: 4
Error: Interface\FrameXML\UIPanelTemplates.lua:249: attempt to concatenate a nil value

--------------------------------------------------

Count: 3
Error: [string "<unnamed>:OnLoad"]:2: attempt to concatenate a nil value

--------------------------------------------------

Count: 1
Error: Interface\FrameXML\MoneyFrame.lua:156: attempt to concatenate local 'frameName' (a nil value)
  Reply With Quote
07-22-06, 12:14 PM   #3
GeoMancer
A Murloc Raider
Join Date: Jul 2006
Posts: 4
This might be of absolutely no help at all, but when you access an Auction frame, it's supposed to make a call to the money object, which isn't being created when you call it. At least, that'd be my guess. There was something about this in the WowWiki page on the beginners thing with creating the total amount of money accumulated thing. ^^; I know this isn't offering any good help, just an idea of a place to look.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Modifying an Existing Frame


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