Originally Posted by myrroddin
Okay, before I go deeper into your initial problem, here's some feedback: - Having a global variable named "P" is near catastrophic. Make that a local variable.
- With LibSharedMedia, do not localize the media name. It won't be localized for anyone who is using a different AddOn than the one you are writing, and will most likely break LSM for other users.
- Get rid of embeds.xml. It was only used years ago by the AceUpdater, which is long defunct. Plus your ToC is loading a file, which in turn is loading more files. Just put all your library lookups directly into the ToC.
- There is no need to localize the word "Profiles"; AceConfig will do that for you.
- Move the creation of self.frames from OnEnable to OnInit. You only need to create the table once.
I'm sure there is more, and what I mentioned doesn't fix your actual problem, but it's a start.
|
Good feedback. This is my first time using the Ace libraries so I'm still getting used to them.
- Good catch, didn't even realize I had left it global
- That was more a weird preference for not having output strings in the middle of code, but considering how AceLocale works, that was basically useless
- Is there any disadvantage to using embeds.xml other than the file loading overhead? I like the idea of keeping my libraries listed in one separate file
- Huh, I was not aware it did that. Good to know.
- Fixed. How often is OnEnable called? Should I worry about it running too often?