I made an addon 'BGCallouts' and it need 4 more addon to work. However i work and install all addons but when i uninstall it only uninstall main addon? How can i more integrate dependencies(?) addon. I am not sure you will understand this but i make a try.
It is four addon in one made my self. Like object oriented programming. So all addon is in my addon 'BGCallout' but when you load wow they also came in wow 'Addons' folder but i dont know how but i guess they must for it to work. So when i delete with curse client only my BGCallouts folder is deleted and the other four addons is still in wow 'Addons' folder.
Those are folders inside your addon. That is not what the "LoadWith" field is for -- "LoadWith" tells WoW "don't load my addon until this other addon loads, and then load my addon automatically right after that other addon loads". It also doesn't do anything at all if you don't also specify "LoadOnDemand: 1".
## Notes: "Work only with DeepwindGorge, ArathiBasin,Gilneas ans EotStorm addon installed"
Again, those things you're listing are folders inside your addon. Also, the purpose of the "Notes" field is to display a short description of your addon to the user. If your addon requires some other addons to be installed, they should be listed in the "Dependencies" field, and WoW will automatically show their names to the user.
It looks like you're expecting the user to manually move the "DeepwindGorge", "ArathiBasin", "Gilneas" and "EotStorm" folders out into the top-level AddOns folder, which is problematic for several reasons:
(1) The whole point of the Curse Client is that users don't have to do anything with files and folders themselves.
(2) The Curse Client isn't smart enough to detect that those folders were inside the folder for an addon it installed. When the user clicked the "Install" or "Update" button next to your addon's name, the only folder it installed was called "BGCallouts", so that's the only folder it knows is part of your addon. That's why the other folders are left behind after uninstalling through the Curse Client.
(3) Those are horrible names for addon folders. Since they are plugins for your "BGCallouts" addon they should be named something that actually marks them as such -- eg. "BGCallouts_ArathiBasin".
You can solve #1 and #2 by either:
(a) developing your addon in a Git or SVN repository hosted on Curse, and using the .pkgmeta file to tell the Curse packager to move those folders out into separate top-level addons automatically, or
(b) when you create the ZIP file, have those folders out at the same level as the main "BGCallouts" folder, not inside of it.
You should also solve #3 by renaming your folders.
Additionally, since all of your sub-addons are marked as dependencies of the main addon, you cannot also mark the main addon as a dependency of all the sub-addons. That just won't work.
Frankly based on the size and scope of each sub-addon, I would strongly recommend not splitting them out into sub-addons at all. Just keep them in the main addon.
Get rid of this file, and just list your libraries directly in the TOC file. Loading an extra file from disk that does nothing but list other files to load is a waste of time.
The only thing these lines will do is cause hidden errors in the user's FrameXML.log file. WoW doesn't understand wildcards. You have to actually list each file you want it to load.
Also, files are loaded in the exact order they are listed. You need to load your libraries before you load your main addon file.
Finally, you should be aware that all of your object and function names are currently global. While this is a bad practice in general, I'm not even going to go into how to make them local, since you've already got enough other things to fix without adding additional concepts to the mix, so you should just add a "BGCallouts_" to the beginning of each frame and function name.
Putting names like "Goblin" in the global namespace is extremely likely to cause a problem. Rename it to "BGCallouts_Goblin" and the chances of a problem-causing conflict go down to almost zero.
I have made a lot of changes and now i get error
attempt to call method 'BGCallouts_func' (a nil value)
If i get it right the function cant be found so i must have made a fail in how to declare the function i guess . Can i get a hint what i missed and why function has a nil value?
self:BGCallouts_func(GetZoneText()) -- error
local function BGCallouts_func(msg)
if (msg=="Arathi Basin") then
elseif (msg=="Deepwind Gorge") then
elseif (msg=="The Battle for Gilneas") then
elseif (msg=="Eye of the Storm") then