Hi Chip,
Thanks to Rhyono and Sounomi I found (or at least I believe to have found) what causes the problem when AwesomeGuildStore is active. They reported that the error shows up when trying to use an item in the inventory when the guild store is the first thing that is opened after loading the UI, but not when the inventory is opened first.
After some investigation I found that when a state change for the INVENTORY_FRAGMENT occurs, the state change callback calls ZO_InventoryManager:UpdateList which then lazily creates the scroll list rows for the passed inventory type. Because of this, all rows are then tainted and cause the issue at hand.
I don't think I can fix this on the addon side, so I hope you could add some code to fill the inventory row pool in InitializeInventoryList (inventory.lua:176)
e.g. add a new argument prefillCount to ZO_ScrollList_AddDataType
Lua Code:
function ZO_ScrollList_AddDataType(self, typeId, templateName, height, setupCallback, hideCallback, dataTypeSelectSound, resetControlCallback, prefillCount)
if(not self.dataTypes[typeId]) then
...
UpdateModeFromHeight(self, height)
if(prefillCount) then
for i = 1, prefillCount do
pool:AquireObject()
end
pool:ReleaseAllObjects()
end
end
end
Lua Code:
local ROW_HEIGHT = 52
local function InitializeInventoryList(inventory)
local listView = inventory.listView
if listView then
ZO_ScrollList_Initialize(listView)
local prefillCount = math.ceil(listView:GetHeight() / ROW_HEIGHT)
ZO_ScrollList_AddDataType(listView, inventory.listDataType, inventory.rowTemplate, ROW_HEIGHT, inventory.listSetupCallback, inventory.listHiddenCallback, nil, ZO_InventorySlot_OnPoolReset, prefillCount)
ZO_ScrollList_AddResizeOnScreenResize(listView)
end
end
Or just make it a boolean and handle the calculations inside, otherwise a screen resize could become an issue.
InventoryGridView will probably suffer from the same problem even when the pool is filled this way, but I haven't checked how the entries are handled there.
Maybe a way to specify a function for the prefillCount calculation before the pool is created would be helpful.