View Single Post
01-19-09, 05:14 PM   #1
Tutje
A Murloc Raider
Join Date: Jan 2009
Posts: 4
Need some help with implementating LibDaraBroker :(

For now i managed pretty well with resources on Internet but now I'm starting to loose it so hoping you can help me.

I'm trying to make a broker for my (first)mod and actually it worked nice until i disabled other mods (in this case recount+broker_recount). Then i got errors. So i'm guessing my mod isn't taking my own LibDataBroker but one from another mod but i leave that up to you.

This is the code i use in my mod:

LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("MyModNameHere", {
type = "launcher",
icon = "Interface\\Icons\\Spell_Fire_Fireball02",
OnTooltipShow = function(self)
GameTooltip:AddLine("Text", HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
end,
OnClick = function(clickedframe, button)
if button == "LeftButton" then
Frame1:Show();
end
end,

I have added 3 files in the root of my addon:
LibStub.lua
CallbackHandler.xml
LibDataBroker-1.1.lua

and also added these in this order in my .toc file.

When logging in without any other mods enabled Swatter gives to following error:

Message: ..\AddOns\HitAssist\Frame.lua line 35:
Cannot find a library instance of "LibDataBroker-1.1".
Debug:
[C]: ?
[C]: error()
!Swatter\Support\LibRevision.lua:47: GetLibrary()
HitAssist\Frame.lua:35: in main chunk

-------------------- and

Message: ..\AddOns\HitAssist\LibDataBroker-1.1.lua line 3:
LibDataBroker-1.1 requires CallbackHandler-1.0
Debug:
[C]: ?
[C]: assert()
HitAssist\LibDataBroker-1.1.lua:3: in main chunk

So i hope anyone got any idea what i'm doing wrong and if you could explain it not to techie English would be great

/cheer
  Reply With Quote