View Single Post
01/30/23, 06:19 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
On first compare I couldn't find any errors in the code.
Will have to use both addons and add debug messages etc. to find out what is happening here

Easiest fix would be to add a table check at the API function. The error happens because at this code
Lua Code:
  1. for cbTabIndex, cbTabEntry in pairs(existingSubfilterCallbacksTableAtGroup) do
  2.                         if cbTabEntry ~= nil and cbTabEntry.name ~= nil and cbTabEntry.name == newPluginCallbackTable.name then

cbTabIndex = "filterCallback" String
cbTabEntry = function pointing to AF_TrialSetFilters.lua:108
Code:
107   local function GetFilterCallbackForSets( setId )
108		return function( slot , slotIndex)
-> And cbTabEntry is expected to be a table with a .name entry
cbTabEntry should be "allTrialSetsDropdownCallback":
Lua Code:
  1. local allTrialSetsDropdownCallback = { name = subMenuEntryAllSets, filterCallback = GetFilterCallbackForSets( allSetsConstantId ) }
There it would find ".name".
But it somehow got to the inner table parts of allTrialSetsDropdownCallback instead, as it was passed to "callbackTable" of the filterInformation.
So somehow, if 2 addons with the same subfilterGroup plugins are active, the scanned table "depth" gets wrong.

Last edited by Baertram : 01/30/23 at 06:40 AM.
  Reply With Quote