Thread Tools Display Modes
12-20-12, 10:26 AM   #1
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
AceGUI-3.0-SharedMediaWidgets

I'm trying to include in my options panel the AceGUI-3.0-SharedMediaWidgets combobox to select the font. I've tried using these two codes, but does not work:

Code:
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="Libs\LibStub\LibStub.lua"/>
<Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
<Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml"/>
<Include file="Libs\AceGUI-3.0\AceGUI-3.0.xml"/>
<Include file="Libs\AceConfig-3.0\AceConfig-3.0.xml"/>
<Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml"/>
<Include file="Libs\AceDB-3.0\AceDB-3.0.xml"/>
<Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml"/>
<Include file="Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
</Ui>
Lua Code:
  1. WelcomeHome = LibStub("AceAddon-3.0"):NewAddon("WelcomeHome", "AceConsole-3.0")
  2.  
  3. local options = {
  4.    type = "group",
  5.    name = "WelcomeHome",
  6.    args = {
  7.     General = {
  8.          type = "group",
  9.          name = "General",
  10.          order = -1,
  11.          args = {
  12.             Info = {
  13.                type = 'select',
  14.      dialogControl = 'LSM30_Font',
  15.      name = 'Some Name',
  16.      desc = 'Some Description',
  17.      values = LSM:HashTable("font"),
  18.      get = function()
  19.           return current
  20.      end,
  21.      set = function(self,key)
  22.           current = key
  23.      end,
  24.             },
  25.          },
  26.       },
  27.    },
  28. }
  29.  
  30. function WelcomeHome:OnInitialize()
  31.     -- Called when the addon is loaded
  32.     LibStub("AceConfig-3.0"):RegisterOptionsTable("WelcomeHome", options)
  33.     self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("WelcomeHome", "WelcomeHome")
  34. end

I have to add something else?
  Reply With Quote
12-20-12, 11:25 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Can you be more specific about how it "does not work"? What does the dropdown look like in-game? Do you have BugSack? Does it report any errors?

Also, your code indentation is really inconsistent.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-21-12, 10:28 AM   #3
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
Did not display the combobox! I solved the problem ;D the documentation found about ACE libraries are very approximate
  Reply With Quote
12-22-12, 08:56 PM   #4
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 133
Well, what were you doing wrong and was ended up being right?
  Reply With Quote
12-29-12, 11:25 PM   #5
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
I had not written this: local LSM = LibStub("LibSharedMedia-3.0")
  Reply With Quote
12-30-12, 04:12 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Just FYI, if you're only going to be using that LSM variable in one place, you should just get rid of the variable and use LibStub("LibSharedMedia-3.0") directly in that one place instead.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » AceGUI-3.0-SharedMediaWidgets


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