View Single Post
10-27-16, 08:34 AM   #25
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
So 7.1 broke this code!

Addon still works partly but I get a spamy error, please someone help?

Error Code:
Code:
439x LinkHover\LinkHover-1.5.lua:34: attempt to index local 'linkData' (a nil value)
LinkHover\LinkHover-1.5.lua:34: in function <LinkHover\LinkHover.lua:33>

Locals:
frame = ChatFrame1 {
 0 = <userdata>
 RefreshIfNecessary = <function> defined =[C]:-1
 OnPostShow = <function> defined =[C]:-1
 isInitialized = 1
 GetNumVisibleLines = <function> defined =[C]:-1
 ScrollUp = <function> defined =[C]:-1
 SetTimeVisible = <function> defined =[C]:-1
 hasOwnFontObject = true
 OnFontObjectUpdated = <function> defined =[C]:-1
 resizeButton = ChatFrame1ResizeButton {
 }
 GetFading = <function> defined =[C]:-1
 Clear = <function> defined =[C]:-1
 shouldFadeAfterInactivity = true
 SetIndentedWordWrap = <function> defined =[C]:-1
 GetTimeVisible = <function> defined =[C]:-1
 GetJustifyV = <function> defined =[C]:-1
 SetFont = <function> defined =[C]:-1
 GetMaxLines = <function> defined =[C]:-1
 BackFillMessage = <function> defined =[C]:-1
 UnpackageEntry = <function> defined =[C]:-1
 FontStringContainer = <unnamed> {
 }
 SetShadowOffset = <function> defined =[C]:-1
 messageTypeList = <table> {
 }
 GetFont = <function> defined =[C]:-1
 checkedGMOTD = true
 SetMaxLines = <function> defined =[C]:-1
 timeVisibleSecs = 20
 PageUp = <function> defined =[C]:-1
 RefreshDisplay = <function> defined =[C]:-1
 SetFontObject = <function> defined =[C]:-1
 MakeFontObjectCustom = <function> defined =[C]:-1
 CalculateNumVisibleLines = <function> defined =[C]:-1
 fontObject = table: 0000020F9598DE60 {
 }
 overrideFadeTimestamp = 3738.725
 SetInsertMode = <function> defined =[C]:-1
 MarkDisplayDirty = <function> defined =[C]:-1
 hasBeenFaded = true
 mouseInTime = 0
 GetMessageInfo = <function> defined =[C]:-1
 ScrollDown = <function> defined =[C]:-1
 AtTop = <function> defined =[C]:-1
 GetFontObject = <function> defined =[C]:-1
 zoneChannelList = <table> {
 }
 SetScrollOffset = <function> defined =[C]:-1
 OnPostUpdate = <function> defined =[C]:-1
 fontStringPool = <table> {
 }
 buttonSide = "right"
 CanEffectivelyFade = <function> defined =[C]:-1
 ScrollToBottom = <function> defined =[C]:-1
 GetInsertMode = <function> defined =[C]:-1
 insertMode = 2
 oldAlpha = 0
 OnPreSizeChanged = <function> defined =[C]:-1
 fadeDurationSecs = 3
 GetScrollOffset = <function> defined =[C]:-1
 isDocked = 1
 GetIndentedWordWrap = <function> defined =[C]:-1
 alternativeDefaultLanguage = "Orcisch"
 defaultLanguage = "Orcisch"
 channelList = <table> {
 }
 GetTextColor = <function> defined =[C]:-1
 tellTimer = 1805.66
 ResetAllFadeTimes = <function> defined =[C]:-1
 flashTimer = 0.41700015217066
 isDisplayDirty = false
 GetSpacing = <function> defined =[C]:-1
 OnPreLoad = <function> defined =[C]:-1
 visibleLines = <table> {
 }
 PackageEntry = <function> defined =[C]:-1
 SetSpacing = <function> defined =[C]:-1
 name = "Allgemein"
 ScrollToTop = <function> defined =[C]:-1
 historyBuffer = <table> {
 }
 isLayoutDirty = false
 AdjustMessageColors = <function> defined =[C]:-1
 GetNumMessages = <function> defined =[C]:-1
 RefreshLayout = <function> defined =[C]:-1
 GetShadowColor = <function> defined =[C]:-1
 isUninteractable = false
 AddMessage = <function> defined @Ace3\AceHook-3.0\AceHook-3.0.lua:100
 GetJustifyH = <function> defined =[C]:-1
 mouseOutTime = 0
 PageDown = <function> defined =[C]:-1
 GetMaxScrollRange = <function> defined =[C]:-1
 SetJustifyH = <function> defined =[C]:-1
 SetFadeDuration = <function> defined =[C]:-1
 GetShadowOffset = <function> defined =[C]:-1
 GetPagingScrollAmount = <function> defined =[C]:-1
 SetTextColor = <function> defined =[C]:-1
 AtBottom = <function> defined =[C]:-1
 buttonFrame = ChatFrame1ButtonFrame {
 }
 SetShadowColor = <function> defined =[C]:-1
 CalculateLineSpacing = <function> defined =[C]:-1
 RemoveMessagesByPredicate = <function> defined =[C]:-1
 InitializeFontableFrame = <function> defined =[C]:-1
 HasFontObject = <function> defined =[C]:-1
 clickAnywhereButton = ChatFrame1ClickAnywhereButton {
 }
 isStaticDocked = true
 SetJustifyV = <function> defined =[C]:-1
 editBox = ChatFrame1EditBox {
 }
 CalculateLineAlphaValueFromTimestamp = <function> defined =[C]:-1
 isLocked = true
 SetFading = <function> defined =[C]:-1
 MarkLayoutDirty = <function> defined =[C]:-1
 AcquireFo
AddOn Code:
Lua Code:
  1. local showLinkType = {
  2.             -- Normal tooltip things:
  3.             achievement  = true,
  4.             enchant      = true,
  5.             glyph        = true,
  6.             item         = true,
  7.             instancelock = true,
  8.             quest        = true,
  9.             spell        = true,
  10.             talent       = true,
  11.             unit         = true,
  12.             currency       = true,
  13.             -- Special tooltip things:
  14.             battlepet           = false,
  15.             battlePetAbil       = false,
  16.             garrfollowerability = false,
  17.             garrfollower        = false,
  18.             garrmission         = false,
  19.         }
  20.          
  21.         local function OnHyperlinkEnter(frame, linkData, link)
  22.             local normal = showLinkType[linkData:match("^(.-):")]
  23.             if normal == true then
  24.                 GameTooltip:SetOwner(ChatFrame1Tab, "ANCHOR_TOPLEFT", 20, 20)
  25.                 GameTooltip:SetHyperlink(link)
  26.                 GameTooltip:Show()
  27.             elseif normal == false then
  28.                 -- Uses a special tooltip, just let the default function handle it.
  29.                 SetItemRef(linkData, link, "LeftButton", frame)
  30.             end
  31.         end
  32.      
  33.         local function OnHyperlinkLeave(frame, linkData, link)
  34.             local normal = showLinkType[linkData:match("^(.-):")]
  35.             if normal == true then
  36.                 GameTooltip:Hide()
  37.             elseif normal == false then
  38.                 -- Uses a special tooltip, just let the default function handle it.
  39.                 SetItemRef(linkData, link, "LeftButton", frame)
  40.             end
  41.         end
  42.          
  43.         local function RegisterFrame(frame)
  44.             frame:SetScript("OnHyperlinkEnter", OnHyperlinkEnter)
  45.             frame:SetScript("OnHyperlinkLeave", OnHyperlinkLeave)
  46.         end
  47.          
  48.         local f = CreateFrame("Frame")
  49.         f:RegisterEvent("PLAYER_LOGIN")
  50.         f:SetScript("OnEvent", function(self, event, name)
  51.             if event == "PLAYER_LOGIN" then
  52.                 for i = 1, NUM_CHAT_WINDOWS do
  53.                     RegisterFrame(_G["ChatFrame"..i])
  54.                 end
  55.             end
  56.             if GuildBankMessageFrame then
  57.                 RegisterFrame(GuildBankMessageFrame)
  58.                 self:UnregisterAllEvents()
  59.                 self:SetScript("OnEvent", nil)
  60.                 RegisterFrame = nil
  61.             else
  62.                 self:RegisterEvent("ADDON_LOADED")
  63.             end
  64.         end)
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote