View Single Post
01-11-24, 01:23 PM   #11
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,937
Lightbulb

Ah, that's how you are receiving the link.

Your addon is being used by your friends and allows them to send an addon message to your addon regarding their tradeskill. Now I am assuming that if you then monitor the chat for those messages, you should be able to get the link you need to use. All you then need to do is put that link in your frame ( which I am assuming you have been doing, but are having a problem clicking on it ). The Hyperlink code we've been using should resolve that problem.

I've never used the addon message system myself so unsure of exactly what its limits are and benefits etc. But if you have that part working as expected and have a link from that source. Then things should work with the examples we've provided.

But, out of my working example the following code is what does the work

Lua Code:
  1. local cf = CreateFrame("Frame","TestFrame",UIParent)
  2. cf:SetSize(600,100)
  3. cf:SetPoint("CENTER",0,0)
  4. cf:SetHyperlinksEnabled(true)                                                    >>>> Add this to your frame
  5. cf.fs = cf:CreateFontString(nil,"OVERLAY","GameFontNormal")
  6. cf.fs:SetText(link)                                                                      >>>> This is where you put your link
  7. cf.fs:SetAllPoints()
  8. cf:SetScript("OnHyperlinkClick", ChatFrame_OnHyperlinkShow)     >>>> Add this to your frame

When you click the link it works just like the ChatFrame and opens the profession frame to the profession linked.

I've never used these myself so was quite happy to see how easy it was to work with. So I am happy to say I learned something new.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote