View Single Post
11/27/17, 04:21 AM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,568
How is reloading one addon without destroying the Lua VM supposed to work? You can't just load it again and hope for the best. Imagine you hook some api function and then reload it and it hooks the same function again. The old hook is still there - it doesn't just disappear. You'd need to somehow undo everything it has done so far, or you are in for some real trouble. It's the same problem that LibStub libraries face. That's why they have load and unload functions and still they have bugs here and there that come from multiple versions getting loaded one after another.

Besides what you are asking for is basically what "/st isolate <addonName>" in sidTools does. It unloads all addons except for the one you specify (and sidTools so you can undo it later) and then you can "RefreshAddon" just that addon via reloadui. Once you are finished working on it you just use "/st restore" and everything is back to how it was.

Delivering chat messages that happened during loading screens after they finished sounds great though! Would certainly welcome that.