View Single Post
03/13/15, 04:03 PM   #14
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Deome View Post
Lua Code:
  1. ZO_ScrollList_AddDataType(ZO_GuildRosterList, DDSK_GUILD_MEMBER_DATA, "ddSKRosterRow", 30, function(control, data) GUILD_ROSTER_MANAGER:SetupGuildMember(control, data) end)
I know I'm repeating myself, but... Why do you insist on calling SetupGuildMember, which doesn't do everything you want, effectively forcing yourself into hooking it? I'm always looking for ways to avoid unnecessary hooks, and this is exactly the case where you can do it cleanly and simply without hooking.
Lua Code:
  1. ZO_ScrollList_AddDataType(ZO_GuildRosterList, DDSK_GUILD_MEMBER_DATA, "ddSKRosterRow", 30,
  2.   function(control, data)
  3.     GUILD_ROSTER_KEYBOARD:SetupRow(control, data) -- original "ZO_KeyboardGuildRosterRow" setup
  4.     -- ... your setup here
  5.   end)

Note the original setup function, which I also used a few posts above, you should've copied that. Here is the function for reference:
Lua Code:
  1. function ZO_KeyboardGuildRosterManager:SetupRow(control, data)
  2.     ZO_SortFilterList.SetupRow(self, control, data)
  3.     GUILD_ROSTER_MANAGER:SetupGuildMember(control, data)
  4. end
ZO_SortFilterList.SetupRow, among other things, calls ColorRow.
  Reply With Quote