Thread Tools Display Modes
11-22-06, 01:27 AM   #1
Jayhawk
Premium Member
 
Jayhawk's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 105
Opening Trade Skill windows

Just wondering...

Is there an API call to open a trade skill window, say Tailoring?
Or is CastSpellByName('Tailoring') the only option?

I've been browsing the API wiki, but...all I find to do with trade skills seems to depend on the window already being open.
  Reply With Quote
11-22-06, 01:33 AM   #2
Nymbia
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 22
Originally Posted by Jayhawk
Just wondering...

Is there an API call to open a trade skill window, say Tailoring?
Or is CastSpellByName('Tailoring') the only option?

I've been browsing the API wiki, but...all I find to do with trade skills seems to depend on the window already being open.
Casting the spell is the only way.
  Reply With Quote
11-22-06, 03:01 PM   #3
Shamino
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 66
using CastSpell or CastSpellByName are the only ways. I have requested on the UI forums to add an API function to open a tradeskill or crafting window without it being a spell, but who knows.

what are you trying to do?
  Reply With Quote
11-23-06, 12:49 AM   #4
Jayhawk
Premium Member
 
Jayhawk's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 105
Well, basically I'm trying to get around the 2.0.1 API breaking my addon (SkillsPlus).

It uses CastSpellByName(skillName) to open the skill windows, but that appears to be seriously broken in TBC. It shows a violation error for calling a protected function. Now supposedly that's only supposed to happen in combat, but that seems not to be the case. As SkillsPlus if FuBar/dewdrop based, it's not really creating any buttons, which makes the SetAttribute command...well, useless.

  Reply With Quote
11-23-06, 06:52 AM   #5
Shamino
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 66
i maintain EnchantingSeller, which had a similar problem. Since I use minimap button to open the frame, the setAttribute works.

now that i've looked at your addon, i understand your problem better. i'm curious if it would be possible to layer a 'hidden' button over the fubar frame. this way you can click on the frame which would activate the onclick of the button.

It would be an extra step for the user, but for the meantime, some mods are going to need workarounds until blizz can offer us a better way.

Also, how do you retrieve the skill information now? when the user opens the skill frame? or do you wait for each craft/tradeskill frame to be opened.
appears you could get all that info from the skills frame. So you could add a message to the user to be sure to open the skills frame, and then you just listen for the event, and process the data when you get it.


Also, find my post on the Wow UI forums, search for Beldarp. And sign my suggestion to add a distinct, non-spell API function, so we can open such frames without it being treated like a spell.
  Reply With Quote
11-24-06, 12:01 PM   #6
Jayhawk
Premium Member
 
Jayhawk's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 105
Thanks for the suggestions, Shamino. I've been thinking along similar lines, by possible creating a hidden button somewhere and writing a MyCastSpellByName, which will set the proper attributes, but, I'm not sure if that will work. Or maybe create a little button bar that floats around somewhere, visible or invisible and call that.

Skills are read initially, without the spellbook needing to be open, and one of the "joys" of the addon is that you don't need the extra buttons.

I'll have a look at WoW UI.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Opening Trade Skill windows

Thread Tools
Display Modes

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