Quote from PhanxAlso, I'd like to point out that the code in the attachment I posted a few days ago already handles the issue of profession data not being available on login. I even tested it, on multiple characters, some without any professions at all.
I'll go look at it. Admittedly I hadn't planned to look at it until I figured this stuff out. Ironically* that just made it take longer :p.
*I always say ironically when I mean "amusingly"...bad habit.
edit: Oh wow yeah, your demo script works perfectly. Feel bad about having you basically make it for me. I'll look over it real intently to learn from your magic.
My next project is a pet/mount addon, since the ones we were using stopped doing what we wanted them to do. Hopefully what I've learned here will lead to that going smoother :).
Quote from SeerahHere's an article to read about load order: http://wowpedia.org/Events_that_fire_during_the_loading_process#Order_of_events_fired_during_loading
Oh very nice. This'll be handy.
About the only problem I see with your addon demo is that it thinks I'm always in combat once I've been in combat once. I'll see if I can figure it out and have it reset after combat has ended.
local inCombat = not InCombatLockdown() --print("ProfessionBroker", "OnEnter", clickable, profession.name) if not inCombat and profession.id and (profession.action1 or profession.action2) then
This is why I get the red message.
not InCombatLockdown is the equivalent of not being in combat. But not not being in combat is in combat so~.
If I switch it to inCombat = InCombatLockdown() it fixes the erroneous "You are in combat" error message but doesn't make it clickable. Will continue investigating.
OnClick = function(this, button) --print("ProfessionBroker", "OnClick", button) print("Oh no!") -- this should never happen end,
Slapped a print in there to see, it does indeed happen. With or without the combat change above. So I'm guessing the overlay on top of the buttons does not exist. I say guess because there are a lot of new tricks and commands in here that I've never seen before haha. Googling them as I go along.
Update: Just to be sure I turned off all addons but titan panel and this one and still the issue persists, so its not an addon conflict.
In my unprofessional opinion I think the problem is at the action1 action2 portion of the script. I am trying to figure it out. I might do one of my "This does X I think" style posts tomorrow. Just so I can know I get it.