Poster: Abraha at 10/6/2005 9:22:59 AM PDT Subject: Suggestion for 1.8/1.9 involving LoadOnDemand |
| |
Edit: Could you comment on this slouken? Do you love it, hate it, feel totally ambivelant towards it? Is it likely to happen in 1.9 maybe? Would make our lives (and possibly even yours) simpler.
Forgive me if this has already been hashed before, but searching in google and this forum proved fruitless.
It would be great if in a future version of the addon support, there was a line something like this:
## LoadOnLoad: SomeLoadOnDemandAddon
If my toc had this and it was LoadOnDemand=1, then when SomeLoadOnDemandAddon was loaded, my addon would be automatically loaded.
A real world example:
AuctionSort is yet another auction UI extension. Now that the auction UI has been broken out into an addon in 1.8, I should use LoadOnDemand to load my addon after Blizzard_AuctionUI is loaded. If I don't do that and just put Blizzard_AuctionUI as my Dependencies, I wind up forcing Blizzard_AuctionUI to be loaded as soon as the user logs in. This defeats the whole purpose of breaking this out into loadondemand addons.
So I can build a loader that detects the auction UI being loaded which then loads AuctionSort. I'll be doing that, but it seems like a poor solution. I have about four or five different auction addons. Each of them are in the same situation. So now am I going to have four or five loaders? Bleh. Seems like it will really bloat the number of addons if you have all these loaders lying around.
Another way is to build a generic LoadOnDemand addon manager that watches all addons being loaded and loads other ones to match. This isn't bad, but seems like a feature that should be part of the core api.
So if I put:
## Title: AuctionSort v1800
## Interface: 1800
## Author: Abraha
## Name: AuctionSort
## Dependencies: Blizzard_AuctionUI
## LoadOnDemand: 1
## LoadOnLoad: Blizzard_AuctionUI
in my toc, when WoW loaded Blizzard_AuctionUI, it would look through the toc list, see that my addon says to load after Blizzard_AuctionUI is loaded. After Blizzard_AuctionUI finishes loading, it would load AuctionSort.[ post edited by Abraha ]
AuctionSort: http://tinyurl.com/c6krl
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=235493&p=#post235493 |
| |
Poster: slouken at 10/12/2005 10:26:48 AM PDT Subject: Re: Suggestion for 1.8/1.9 involving LoadOnDe |
| |
LoadWith is an interesting idea. I'll consider it for 1.9, if there's time.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=235493&p=#post240936 |
Poster: slouken at 10/12/2005 10:52:22 AM PDT Subject: Re: Suggestion for 1.8/1.9 involving LoadOnDe |
| |
By the way, my main concern with something like this is what happens when there are interdependent addons? e.g.
A loads on demand
B loads with A and depends on C
C loads with D or F
In this case, what would actually happen is:
A loads
C loads (but expects to load after D or F)
B loads
In this case, B can cause C to load unexpectedly. To solve this, C should probably list D and F as optional dependencies.
In fact, any "LoadWith" addons should probably automatically be considered optional dependencies. This would mean in the above example, that if you manually load B, it would automatically cause A, D, C, and B to be loaded in that order.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=235493&p=#post240975 |
Poster: slouken at 10/12/2005 11:30:38 AM PDT Subject: Re: Suggestion for 1.8/1.9 involving LoadOnDe |
| |
Q u o t e:
I want to be able to keep A and B mutually exclusive, but if LoadWith creates an implied optional dependency then that doesn't really work right.
Ah, yes, this is true. In this case, how would you code defensively, if your addon is manually loaded?
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=235493&p=#post241062 |
Poster: slouken at 10/14/2005 2:58:52 PM PDT Subject: Re: Suggestion for 1.8/1.9 involving LoadOnDe |
| |
LoadWith is implemented, see the 1.9 changes thread for details.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=235493&p=#post244240 |
Poster: slouken at 10/14/2005 3:01:03 PM PDT Subject: Re: Suggestion for 1.8/1.9 involving LoadOnDe |
| |
You're welcome! Thanks for a well thought out, easily implementable suggestion! :)
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=235493&p=#post244243 |