Anyone know a good way to have a scroll frame i've been stuck at this hurdle in my project for some time now. With this limit in the Designer i've considered having a file i edit manually and never open in the editor again after it's set up.
My last attemped involved useing a .lua and creating a .xml file Not a Form. The issues i'm having now is being able to call functions from outside of the .script file.
EX:
Code:
MyModData = {};
function MyMod_OnLoad()
for i=1,50 do
MyModData[i] = "Test "..math.random(100)
end
--Esc Close Option
tinsert(UISpecialFrames,this:GetName());
MyModScrollBar:Show();
end
function MyModScrollBar_Update()
DEFAULT_CHAT_FRAME:AddMessage("UpdateCalled");
local line; -- 1 through 5 of our window to scroll
local lineplusoffset; -- an index into our data calculated from the scroll offset
FauxScrollFrame_Update(MyModScrollBar,50,5,16);
for line=1,5 do
lineplusoffset = line + FauxScrollFrame_GetOffset(MyModScrollBar);
if lineplusoffset < 50 then
getglobal("MyModEntry"..line.."_Text"):SetText(MyModData[lineplusoffset]);
getglobal("MyModEntry"..line):Show();
else
getglobal("MyModEntry"..line):Hide();
end
end
end
Code:
<Scripts>
<OnVerticalScroll>
FauxScrollFrame_OnVerticalScroll(16, MyModScrollBar_Update);
</OnVerticalScroll>
<OnShow>
MyModScrollBar_Update()
</OnShow>
</Scripts>
The OnShow works but for some reason the update doesn't work.
And i'm unable to call MyModScrollBar:Show();
from outside of the MyModScrollBar.lua
Any help or tips how i might be able to call these functions correctly?
Code came from
http://www.wowwiki.com/
My Mod: Raid Leader Plus
http://www.mtsu.edu/~jea2g/RLP.zip