View Single Post
09-19-14, 09:14 AM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by benots4 View Post
What you’re telling me is that there is no way to change the text; I can only use the set text function to write text over the existing text.
No, phanx is telling you to stop creating new font strings on top of the old ones every time you want to update the text.

She gave you an example and you put the entire thing inside of a function which is overwriting the table that's tracking what rows have already been created every time it's run.

Every time you call "ShowGroupMemberList", which I'm guessing is being called every time you scroll, you're wiping out the table that's supposed to be tracking which rows have already been created.

The ONLY part that should be inside of that function is this:
Lua Code:
  1. function ShowGroupMemberList(v)
  2.     if v < 1 then v = 1 end
  3.     for i = 1, displayRows  do
  4.         local name = pInfoArray[v].Name;
  5.         if pInfoArray[v].Class and pInfoArray[v].Class:upper() ~= "UNKNOWN" then
  6.             name = "\124cFF"..(pInfoArray[v].Online and GuildRole_Class_Colors[pInfoArray[v].Class:upper()] or "808080")..pInfoArray[v].Name.."\124r";
  7.         end    
  8.         local row = rowFrames[i] or CreateRow(i)
  9.         row:SetText(name)
  10.         v=v+1
  11.     end
  12. end
Everything else that you put in that function should be outside of, and above it.
  Reply With Quote