WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Opening Trade Skill windows (https://www.wowinterface.com/forums/showthread.php?t=6939)

Jayhawk 11-22-06 01:27 AM

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.

Nymbia 11-22-06 01:33 AM

Quote:

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.

Shamino 11-22-06 03:01 PM

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?

Jayhawk 11-23-06 12:49 AM

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.

:(

Shamino 11-23-06 06:52 AM

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.

Jayhawk 11-24-06 12:01 PM

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.


All times are GMT -6. The time now is 07:10 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI