View Single Post
03-29-24, 09:52 AM   #1
Codger
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2021
Posts: 30
What does this code do?

I've seen this in a couple addons but haven't been able to find any info on what it does:

Lua Code:
  1. local frame1 = {}
  2. myAddon.frame1 = frame1

I'm guessing it's another way of setting up a namespace?
What I am doing in an addon is:

Lua Code:
  1. local addonName, addonTable = ...
  2. function addonTable:doSomething()

which requires me to preface everywhere I use doSomething() with addonTable.
Curious if this is a better way?
  Reply With Quote