Thread: Include files
View Single Post
09-19-18, 08:55 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Splitting is easy.

Just add all your files to the TOC. (This requires a restart of the WoW client if changed!)

Example:
https://github.com/zorker/rothui/blo...oUF_Simple.toc

In every addon file you have access to globals, locals and your addon namespace.

Lua Code:
  1. --addon name, addon namespace
  2. local an, ans = ...

You can add functions and objects to your addon namespace without poluting the global namespace.
Making an object global, keeping it local or adding it to the addon namespace is up to you.

Example:
https://github.com/zorker/rothui/blo.../functions.lua
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 09-19-18 at 09:02 AM.
  Reply With Quote