View Single Post
09/04/15, 10:09 PM   #7
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Originally Posted by circonian View Post
Example: (I combined your New & Initialize functions)
Lua Code:
  1. function CustomerList:New()
  2.     local manager = ZO_SortFilterList.New(self, CustomerListContainer)
  3.     manager.masterList = {}
  4.    
  5.     ZO_ScrollList_AddDataType(manager.list, 1, "CustomerUnitRow", 30, function(control, data) manager:SetupUnitRow(control, data) end)
  6.     ZO_ScrollList_EnableHighlight(manager.list, "ZO_ThinListHighlight")
  7.     manager.sortFunction = function(listEntry1, listEntry2) return ZO_TableOrderingFunction(listEntry1.data, listEntry2.data, manager.currentSortKey, CustomerList.SORT_KEYS, manager.currentSortOrder) end
  8.     manager.sortHeaderGroup:SelectHeaderByKey("name")
  9.     manager:RefreshData()
  10.    
  11.     return manager
  12. end
  13.  
  14. TRADESMAN.CustomerList = CustomerList:New()
AWESOME!! thanks so much man! thats big time. I really appreciate.. I'm a Newb at Lua... just live in the asp.net world so i'm learning as I go... I really appreciate it! thanks for the quick resolution.
  Reply With Quote