WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   FauxScrollFrameTemplate: Won't update. Help please :) (https://www.wowinterface.com/forums/showthread.php?t=33370)

Ullvantar 06-23-10 05:54 AM

FauxScrollFrameTemplate: Won't update. Help please :)
 
Hello,

For an assignment I am tasked to (amongst other things) have a FauxScrollFrame with some elements in it.

Problem is, I can't seem to update the scroll.

In my xml I have

..
Code:

<OnVericalScroll>
FauxScrollFrame_OnVerticalScroll(this, offset, 16, RocketHistoryFrame_UpdateScroll)
</OnVericalScroll>

..

And in my .lua file

...
Code:

function RocketHistoryFrame_UpdateScroll()
        local line = 0
        local lineplusoffset = 0
       
        FauxScrollFrame_Update(RocketHistoryFrameX, 50, 5, 16)
        print("Updating Scroll")
        for line=1,5 do
                a = FauxScrollFrame_GetOffset(RocketHistoryFrameX)
               
                if not a == nil then
                        lineplusoffset = line + a
                else
                        lineplusoffset = line
                end
                if lineplusoffset < 50 then
                        getglobal("Button"..line):SetText(MyModData[lineplusoffset])
                        getglobal("Button"..line):Show()
                else
                        getglobal("Button"..line):Hide()
                end
        end
 
end

..

Now for some reason the scroll wont update, thus always returns nil on GetOffset (placed a safeguard just to see if other things worked).

Any ideas?


All times are GMT -6. The time now is 11:08 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI