Thread Tools Display Modes
10-13-05, 08:01 AM   #1
Tria
A Defias Bandit
Join Date: Oct 2005
Posts: 2
Post TradeSkillFrame in 1.8

Hi.

I have an addin that used to refer to the TradeSkillFrame, to place button on it.
After updating to version 1.8 it does not work anymore.

I guess it has to do with the move to the Blizzard_TradeSkillUI addin.

Does anyone know what the frame is now called?
  Reply With Quote
10-14-05, 05:36 PM   #2
omoda
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 11
Im wondering the same thing.. I cant even get simple examples to work, well nothing more complicated than OnLoad messages
  Reply With Quote
10-15-05, 11:48 AM   #3
omoda
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 11
Still nothing new. Been trying all sorts of things.. and nothing. Also posted on the Blizzard UI forum but nothing there yet (surprised?).
  Reply With Quote
10-19-05, 09:20 AM   #4
ayradyss
A Theradrim Guardian
 
ayradyss's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 68
Testing info

For TESTING purposes only, add
## RequiredDeps: Blizzard_TradeSkillUI
to your TOC file - that'll force the TradeSkill UI bits to load on startup, and you can see if your mod's functions are still working. If you're hooking or altering anything in the frame, you need the TradeSkill UI to load before you do something.
Adding it as a Dep (thanks, Fizzwidget for the reminder) is NOT the right way to do this, as it obviates Blizzard's hard work in breaking them out.

For USING the new mods, you should make your UI hooks dependent on the TradeSkill UI loading. For example:

In your OnLoad, you should be registering the event "ADDON_LOADED".
In your XML, you should have an OnEvent function, with a corresponding MyAddOn_OnEvent function in the main LUA.
In that function it should look like this:

Code:
if event == "ADDON_LOADED" then
   if arg1 == "Blizzard_TradeSkillUI" then
	  My_OldHookedFunction = Blizzard_FunctionIwantToHook;
	  Blizzard_FunctionIwantToHook = My_FunctionToReplaceBlizzard;
.... and so on for all the things that you do. This may include calling a new OnLoad to put your buttons in or whatever. The point is that you need to wait for the TradeSkillUI to load for the first time before you can do anything to it, and that that no longer necessarily happens as you're logging in.
Make sense?
  Reply With Quote
10-19-05, 09:42 AM   #5
omoda
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 11
I didn't try "## RequiredDeps: Blizzard_TradeSkillUI" since it circumvents the whole purpose of why bliz separated that stuff out to begin with.

I'm waiting for ## LoadWith:: which isn't available until 1.9

That is the whole reason for the ChatMatsLoader. Hopefully the loader will go away with the RequiredDeps addition.

And, Where were you 4 days ago!

I should also note that after I got the right subject, the wow UI forum help and responses were great.

Last edited by omoda : 10-19-05 at 09:48 AM.
  Reply With Quote
10-19-05, 03:08 PM   #6
ayradyss
A Theradrim Guardian
 
ayradyss's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 68
4 days ago?

Four days ago, I was admitting asthmatic kids to the hospital until 3 AM

Just as a warning, 1.9 may be a loooong patch cycle to wait. Seems like maybe we should all be conspiring to make an on-demand loader to fill in the blanks.
  Reply With Quote
10-19-05, 05:15 PM   #7
Kaelten
Jack's raging bile duct
 
Kaelten's Avatar
Featured
Join Date: May 2005
Posts: 782
I found that setting everything up in response to the first TRADE_SHOW (at least I think that sthe proper name) got it working right. The newest version of KC_ET shows this, and it was doable without force loading the Trade window.
__________________
WowAce.com & CurseForge.com Adminstrator
Developer of Ace3, OneBag3, and many other addons and libraries
Project lead and Mac developer for the Curse Client

Anyone that needs what they want
And doesn't want what they need
I want nothing to do with
  Reply With Quote
10-20-05, 12:48 AM   #8
Elkano
A Flamescale Wyrmkin
 
Elkano's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 131
Well, I'm using ReagentInfo, which also uses TRADE_SKILL_SHOW, but still I get an error the first time I open the trade skill window. So it might be that the event method isn't 100% safe
  Reply With Quote
10-25-05, 12:34 AM   #9
Tria
A Defias Bandit
Join Date: Oct 2005
Posts: 2
Hi.

Thanks for the replies.

I ended up creating a loader for my addon, that overloads the TradeSkillFrame_LoadUI function like this:

Code:
local old_TradeSkillFrame_LoadUI = TradeSkillFrame_LoadUI;
function TradeSkillFrame_LoadUI()
    old_TradeSkillFrame_LoadUI();
    LoadAddOn(<myAddOnName>);
end
And then made my addOn dependent on Blizzard_TradeSkillUI and LoadOnDemand.

This seems to do the trick...
  Reply With Quote
10-25-05, 09:38 AM   #10
omoda
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 11
Hooking TradeSkillFrame_LoadUI is interesting.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » TradeSkillFrame in 1.8


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