Quantcast
FauxScrollFrameTemplate: Won't update. Help please :) - WoWInterface
Thread Tools Display Modes
06-23-10, 05:54 AM   #1
Ullvantar
A Kobold Labourer
Join Date: Jun 2010
Posts: 1
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?
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » FauxScrollFrameTemplate: Won't update. Help please :)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off