Reply
Thread Tools Display Modes
Unread 12-20-12, 10:26 AM   #1
Benalish
An Aku'mai Servant
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 33
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?
Benalish is offline   Reply With Quote
Unread 12-20-12, 11:25 PM   #2
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,748
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.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 12-21-12, 10:28 AM   #3
Benalish
An Aku'mai Servant
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 33
Did not display the combobox! I solved the problem ;D the documentation found about ACE libraries are very approximate
Benalish is offline   Reply With Quote
Unread 12-22-12, 08:56 PM   #4
pelf
Sentient Plasmoid
 
pelf's Avatar
Premium Member
Join Date: May 2008
Posts: 128
Well, what were you doing wrong and was ended up being right?
pelf is offline   Reply With Quote
Unread 12-29-12, 11:25 PM   #5
Benalish
An Aku'mai Servant
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 33
I had not written this: local LSM = LibStub("LibSharedMedia-3.0")
Benalish is offline   Reply With Quote
Unread 12-30-12, 04:12 AM   #6
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,748
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.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » AceGUI-3.0-SharedMediaWidgets

Thread Tools
Display Modes

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