View Single Post
01-24-18, 01:16 PM   #9
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Originally Posted by myrroddin View Post
As an experiment, temporarily remove all .ace from your G table, so it reads like G:OnInitialize, G.db, etc.

Further, I suspect (but can't confirm) that the following line is the root of your issue. Assuming that your posted code is the first Lua file loaded that isn't a localization file or a library, the tables G and V do not exist as far as AceDB is concerned, but F does. It would greatly help if you posted a zip of your addon for downloading and testing.

What are the full names for F, G, and V? What do they represent? Single letters are beyond vague.
Code:
local F, G, V = unpack(select(2, ...))
Hmm that could be it... Tbh I haven't looked a ton into namespaces with lua etc. and just saw this of a way of sharing Variables across files easily. F stands for Functions and has global functions like createBorder or so. G is just for Variables for my UI like G.texture which is the default texture, and finally V is less used but was supposed to be something for Variables like V.playerName and the name is stored in there.

I saw something similar in ElvUI and just started copying it in my own way, guess it doesn't make a ton of sense and I'm just using it as a dirty hack currently.
I start all my lua files with that btw.

This explains it a bit:
Lua Code:
  1. local addon, core = ...
  2. local name, ns = ...
  3.  
  4. core[1] = {} -- F, functions
  5. core[2] = {} -- G, globals like fonts, textures, media, Ace3
  6. core[3] = {} -- V, variables
  7.  
  8. local F, G, V = unpack(select(2, ...))

You can download the Addon via github https://github.com/gempir/gempUI/archive/master.zip just rename the folder inside the zip to gempUI

Last edited by gempir : 01-24-18 at 02:24 PM.
  Reply With Quote