Quantcast WoWInterface - View Single Post - Include files
Thread: Include files
View Single Post
09-12-18, 03:51 AM   #2
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
In short: No, you can't create a merge in that way.

If you break things out into individual files they have their own context (e.g, locals are local to that space, etc) which is a good thing for managing large amounts of code and simplifies design and debugging.

Those file segments have access to as shared namespace that is passed to each segment -- to capture it, place " local addonName, nameSpace = ... " (the first var is the string-name of the addon, the second is the namespace table) at the top of each file.

If you just want to break things apart, store your addon-global vars in the namespace table, then you can declare the file-order in the .toc file, which loads and executes in order, iirc.

Not sure why you'd want to go through that rather than use they hyper-friendly lua function but it might get you past one-massive-why-would-you-do-that-to-yourself-file problem.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote