View Bug Report | ||||||||||||||
|
Notes | Sort Options |
By: Seerah - 07/20/14 07:52 PM |
Yep, it would be the counter that would do it. When I fixed up LibMediaProvider, I also fixed the same bug with LAM. This may be what triggered this bug to finally show up. |
By: Garkin - 07/20/14 08:48 PM |
Maybe it is a bad question, but I always tought that when you use: [highlight="lua"]LAMCreateControl.scrollCount = 1 local scrollCount = LAMCreateControl.scrollCount[/higlight] You will still have local variable scrollCount with value 1. As far as I know only tables are references to the original variable, other variables are simply copied. So I believe that your fix does not work. |
By: Seerah - 07/20/14 09:20 PM |
I was only thinking of LAM handling the creating itself, and not of anyone using the LAMCreateControl methods directly. >< And I need to stop trying to fix things in a hurry while I have other things on my mind... /sigh |
By: Seerah - 07/20/14 09:30 PM |
/edit: scrollCount would still increment as only one copy of the function will be used by the time everything all loads into memory. But you're right. LAMCreateControl.scrollCount would not increment meaning that if any addon tried to create a panel during its Initialization then LAMCreateControl.scrollCount would not have the correct value for any later versions of LAM2 that load. As for the error that was reported, it was because LAM2 creates panels as they are registered. (The option controls themselves aren't created until the panel is viewed for the first time.) If a panel was registered and created prior to a later version of the library loading into memory, it would give this error. |