Running into issues with LAM, first addon with it!
Hey there everyone. So I created a super basic addon way long ago, bigger chat window. Basically a brainless addon to create. But now I am attempting to create my own version of the "ESO Toolbox" addon called "Expanded Options", but I want to build it myself and have more options.
I am running into issues at the very start. I want to have a settings window for this addon in the Addon Settings Menu in the default UI, but it just is not working at all. I was trying to pull parts of code from other addons with very very basic LAM settings window in the addon settings menu part of the default UI. As an example I pulled out the AlignGrid LAM parts of the main lua and put it into my addon, I changed all the relevant information to remove anything with AlignGrid to ExpandedOptions. The addon is recognized by ESO and it shows up in the ESO Addons and is enabled. However I am seeing nothing in the Addons Settings Menu. I am at a loss of what to do. I am an incredible newbie with LUA and making addons, I have updated a couple buy basically just updating the TOC and Library files, nothing code related. Here is the contents of ExpandedOptions.lua Code:
local LAM2 = LibStub:GetLibrary("LibAddonMenu-2.0") Code:
## Title: Expanded Options |
Quote:
And look at your manifest txt at LibStub: Is it lib or libs? |
Quote:
I also edited this line in the .txt file - libs\LibStub\LibStub.lua It now matches the other library file locations. Still no menu working. |
Is the addon loaded? Did you test with d("debug message") in your addon loaded function to see how far the addon gets?
Are the variables optionData and panel data inside any function or (only local defined in this function then) or directly in the addon file (thus global locals within your addon and known to the function onAddonLoaded this way)? |
Next question: Where do you define WM?
Code:
local function AddOnLoaded(eventID,addonName) |
Quote:
Quote:
|
Look into the LAM folder (download it totally fresh without addons from www.esoui.com http://www.esoui.com/downloads/info7-LibAddonMenu.html). There is an example.lua file in there.
WM should be the WINDOW_MANAGER so you need to define it with local wm = WINDOW_MANAGER or use WINDOW_MANAGER instead of WM. |
Quote:
Alright this is what I have so far: ExtendedOptions.txt Code:
## Title: Extended Options Code:
local panelData = { Extended Options -> ExtendedOptions.txt ExtendedOptions.lua libs libs -> LibAddonMenu-2.0 LibStub LibAddonMenu-2.0.txt |
Ok, please put your WHOLE addon, including the lua files, into a ZIP archive and upload it here so we can see all code of the addon.
If you simply put the LAM menu into your file ExtendedOptions.lua., and there is no EVENT_ADDON_LOADED int here which "enables your addon" and starts to call the LAM object etc. you won't see anything. So please provide the WHOLE code of your addon here so we can check and help you. Thanks |
1 Attachment(s)
Quote:
|
Looked quickly at it and ...
http://wiki.esoui.com/Main_Page http://wiki.esoui.com/Getting_Started http://wiki.esoui.com/Writing_your_first_addon http://wiki.esoui.com/SimpleNotebookTutorial/part1 I would also say that when you don't understand something, look at how others did and do same. |
As I thought you are not building an addon. You are just putting some lua source code for a LAM in your file and that's all :rolleyes:
Please read the links that Ayantir provided and see how an addon must be build in the addon's lua file. Especially the event like EVENT_ON_ADDON_LOADED etc. The lua interpreter is reading your source code from the top of the fie downwards to the bottom so be sure to put your variables and functions etc. in the correct order, so that "called variables/functions" further down in your code will be declared above the code where they are called. |
Quote:
Quote:
|
Without your addon around the menu the menu will not be shown as it relies on an addon construct in the back. If your addon is not loaded the menu won't be loaded :D
|
All times are GMT -6. The time now is 04:48 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI