Thread Tools Display Modes
05-01-06, 03:58 PM   #1
willister
A Defias Bandit
Join Date: May 2006
Posts: 3
Converting an existing addon to work with FuBar

Hiya there, I'm interesting in where I can find out more infomation about Fubar, specifically, how I can make a current mod, which is Titan compatible, work with FuBar. I need my mod to stay only optionaly dependant on Ace, so that users who dont use either titan or fubar can still use the main features of my mod.

All I really want to do is to register with fubar, and then update the fubar text manually, when I update my other data, not at a timed interval. I've looked over the FuBar api, and hit problems right at the very start, as I can't even work out how to tell if fubar is installed. Titan was easy, if(TitanPanelBarButton~=nil), but is there a similar way to check for FuBar?

I've been asked by a few people to update my KillsToLevel mod, and any help, or pointers in the right direction would be appreacated.
  Reply With Quote
05-01-06, 04:08 PM   #2
ckknight
A Warpwood Thunder Caller
 
ckknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 90
To check for FuBar:

if FuBar then
...
end

just make a small plugin that you update the text for, here'd be a quick example:

if FuBar then
WhateverFu = FuBarPlugin:new {
name = "FuBar - WhateverFu",
desc = "Description",
version = "1.0",
aceCompatible = 103,
fuCompatible = 102, -- or 100 if you want to use the 1.0 API. (more stable, less features)
author = "willister",
email = "[email protected]",
website = "willister.wowinterface.com",
category = "others",
db= AceDatabase:new("WhateverFu"),
hasIcon = true,
}

function WhateverFu:UpdateText()
self:SetText("put text here")
end
end

And that's pretty much it. have UpdateText do a pull for information. call WhateverFu:UpdateText() whenever something changes.
  Reply With Quote
05-01-06, 04:58 PM   #3
willister
A Defias Bandit
Join Date: May 2006
Posts: 3
Thanks for the prompt reply, its really helped in getting the mod updated. Stuck with a tiny problem though, whenever I call KillsToLevelFu:updateText(), I get a Cannot set text without a self.textFrame. Something simple I'm missing?

Looking over the example plugins had daunted me more than they needed to, it seems, as it looked like almost a different language to the LUA I knew. With a pointer in the right direction, its becoming much more managable. Thanks.
  Reply With Quote
05-01-06, 05:21 PM   #4
willister
A Defias Bandit
Join Date: May 2006
Posts: 3
Never mind, got it working. You forgot to mention textFrame = "" in FuBarPlugin, and RegisterForLoad(), but now that I understand the language a bit , I shouldn't miss the simple things.

Thanks anyway, I should have a working mod soon!
  Reply With Quote
05-01-06, 07:44 PM   #5
ckknight
A Warpwood Thunder Caller
 
ckknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 90
gah, do not set textFrame. That is set for you.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Converting an existing addon to work with FuBar


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off