View Single Post
10-07-05, 05:19 AM   #23
Gorak
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 21
Well, this whole dynamic loading, and the whole add-on system, has suffered from one major setback for a long time: no modularity supported.

I developed an add-on which was supposed to be designed in an object-oriented way, as in, different components and their settings divided to different files, with one central add-on file that managed the loading and restoring of the settings database. This, obviously, did not work since all the XML files in the folder were marked equal in priority, and got loaded in in a random sequence, making it impossible to predict if the central piece was loaded before the sub-ones.

The only way to circumveint this was to register the central add-on to listen for messages that certainly come before others, such as ADDON_LOADED comes before VARIABLES_LOADED, but this failed, since the OnUpdate handler in XML _is_ called before either ones of these arrive, if the add-on's frames are visible.

While Blizzard was developing the load-on demand system, they should've made the UI system support componentialism that is, you could divide your add-on to multiple independent components under a single folder, and load them as necessary. Currently, the only way to do this is to mark the components as LoadOnDemand and place them to seperate folders under Interface\\AddOns. Not very modular, if you ask me.

- Gorak
  Reply With Quote