Go to Page... |
Compatibility: | Update 43 (10.1.0) Gold Road (10.0.0) Scions of Ithelia (9.3.0) |
Updated: | 08/24/24 07:25 PM |
Created: | 01/24/23 03:57 PM |
Monthly downloads: | 15,394 |
Total downloads: | 298,112 |
Favorites: | 121 |
MD5: |
--Adds a scrollable dropdown to the comboBoxControl, replacing the original dropdown, and enabling scrollable submenus (even with nested scrollable submenus) -- control parent Must be the parent control of the comboBox -- control comboBoxContainer Must be any ZO_ComboBox control (e.g. created from virtual template ZO_ComboBox -> Where ZO_ComboBox_ObjectFromContainer can find the m_comboBox object) -- -- table options:optional = { --> === Dropdown general customization ================================================================================= -- number visibleRowsDropdown:optional Number or function returning number of shown entries at 1 page of the scrollable comboBox's opened dropdown -- number visibleRowsSubmenu:optional Number or function returning number of shown entries at 1 page of the scrollable comboBox's opened submenus -- number maxDropdownHeight Number or function returning number of total dropdown's maximum height -- boolean sortEntries:optional Boolean or function returning boolean if items in the main-/submenu should be sorted alphabetically. !!!Attention: Default is TRUE (sorting is enabled)!!! -- table sortType:optional table or function returning table for the sort type, e.g. ZO_SORT_BY_NAME, ZO_SORT_BY_NAME_NUMERIC -- boolean sortOrder:optional Boolean or function returning boolean for the sort order ZO_SORT_ORDER_UP or ZO_SORT_ORDER_DOWN -- string font:optional String or function returning a string: font to use for the dropdown entries -- number spacing:optional, Number or function returning a Number: Spacing between the entries -- boolean disableFadeGradient:optional Boolean or function returning a boolean: for the fading of the top/bottom scrolled rows -- table headerColor:optional table (ZO_ColorDef) or function returning a color table with r, g, b, a keys and their values: for header entries -- table normalColor:optional table (ZO_ColorDef) or function returning a color table with r, g, b, a keys and their values: for all normal (enabled) entries -- table disabledColor:optional table (ZO_ColorDef) or function returning a color table with r, g, b, a keys and their values: for all disabled entries -- boolean highlightContextMenuOpeningControl Boolean or function returning boolean if the openingControl of a context menu should be highlighted. Only works at the contextMenu options! -- If you set this to true you also need to set data.m_highlightTemplate at the row and provide the XML template name for the highLight, e.g. "LibScrollableMenu_Highlight_Green" --> ===Dropdown header/title ========================================================================================== -- string titleText:optional String or function returning a string: Title text to show above the dropdown entries -- string titleFont:optional String or function returning a font string: Title text's font. Default: "ZoFontHeader3" -- string subtitleText:optional String or function returning a string: Sub-title text to show below the titleText and above the dropdown entries -- string subtitleFont:optional String or function returning a font string: Sub-Title text's font. Default: "ZoFontHeader2" -- number titleTextAlignment:optional Number or function returning a number: The title's vertical alignment, e.g. TEXT_ALIGN_CENTER -- userdata customHeaderControl:optional Userdata or function returning Userdata: A custom control thta should be shown above the dropdown entries -- boolean headerCollapsible Boolean or function returning boolean if the header control should show a collapse/expand button --> === Dropdown text search & filter ================================================================================= -- boolean enableFilter:optional Boolean or function returning boolean which controls if the text search/filter editbox at the dropdown header is shown -- function customFilterFunc A function returning a boolean true: show item / false: hide item. Signature of function: customFilterFunc(item, filterString) ---> === Dropdown callback functions -- function preshowDropdownFn:optional function function(ctrl) codeHere end: to run before the dropdown shows ---> === Dropdown's Custom XML virtual row/entry templates ============================================================ -- boolean useDefaultHighlightForSubmenuWithCallback Boolean or function returning a boolean if always the default ZO_ComboBox highlight XML template should be used for an entry having a submenu AND a callback function. If false the highlight 'LibScrollableMenu_Highlight_Green' will be used -- table XMLRowTemplates:optional Table or function returning a table with key = row type of lib.scrollListRowTypes and the value = subtable having -- "template" String = XMLVirtualTemplateName, -- rowHeight number = ZO_COMBO_BOX_ENTRY_TEMPLATE_HEIGHT, -- setupFunc = function(control, data, list) -- local comboBox = ZO_ComboBox_ObjectFromContainer(comboBoxContainer) -- comboBoxContainer = The ZO_ComboBox control you created via WINDOW_MANAGER:CreateControlFromVirtual("NameHere", yourTopLevelControlToAddAsAChild, "ZO_ComboBox") -- comboBox:SetupEntryLabel(control, data, list) -- -->See class comboBox_base:SetupEntry* functions above for examples how the setup functions provide the data to the row control -- -->Reuse those where possible by calling them via e.g. self:SetupEntryBase(...) and then just adding your additional controls setup routines -- end -- -->See local table "defaultXMLTemplates" in LibScrollableMenu -- -->Attention: If you do not specify all template attributes, the non-specified will be mixedIn from defaultXMLTemplates[entryType_ID] again! -- { -- [lib.scrollListRowTypes.LSM_ENTRY_TYPE_NORMAL] = { template = "XMLVirtualTemplateRow_ForEntryId", ... } -- [lib.scrollListRowTypes.LSM_ENTRY_TYPE_SUBMENU] = { template = "XMLVirtualTemplateRow_ForSubmenuEntryId", ... }, -- ... -- } ---> === Narration: UI screen reader, with accessibility mode enabled only ============================================ -- table narrate:optional Table or function returning a table with key = narration event and value = function called for that narration event. -- Each functions signature/parameters is shown below! -- -> The function either builds your narrateString and narrates it in your addon. -- Or you must return a string as 1st return param (and optionally a boolean "stopCurrentNarration" as 2nd return param. If this is nil it will be set to false!) -- and let the library here narrate it for you via the UI narration -- Optional narration events can be: -- "OnComboBoxMouseEnter" function(m_dropdownObject, comboBoxControl) Build your narrateString and narrate it now, or return a string and let the library narrate it for you end -- "OnComboBoxMouseExit" function(m_dropdownObject, comboBoxControl) end -- "OnMenuShow" function(m_dropdownObject, dropdownControl, nil, nil) end -- "OnMenuHide" function(m_dropdownObject, dropdownControl) end -- "OnSubMenuShow" function(m_dropdownObject, parentControl, anchorPoint) end -- "OnSubMenuHide" function(m_dropdownObject, parentControl) end -- "OnEntryMouseEnter" function(m_dropdownObject, entryControl, data, hasSubmenu) end -- "OnEntryMouseExit" function(m_dropdownObject, entryControl, data, hasSubmenu) end -- "OnEntrySelected" function(m_dropdownObject, entryControl, data, hasSubmenu) end -- "OnCheckboxUpdated" function(m_dropdownObject, checkboxControl, data) end -- "OnRadioButtonUpdated" function(m_dropdownObject, checkboxControl, data) end -- Example: narrate = { ["OnComboBoxMouseEnter"] = myAddonsNarrateComboBoxOnMouseEnter, ... } -- } function AddCustomScrollableComboBoxDropdownMenu(parent, comboBoxContainer, options)
Entry types: LSM_ENTRY_TYPE_NORMAL LSM_ENTRY_TYPE_DIVIDER LSM_ENTRY_TYPE_HEADER LSM_ENTRY_TYPE_SUBMENU LSM_ENTRY_TYPE_CHECKBOX LSM_ENTRY_TYPE_BUTTON LSM_ENTRY_TYPE_RADIOBUTTON --Adds a new entry to the context menu entries with the shown text, where the callback function is called once the entry is clicked. --If entries is provided the entry will be a submenu having those entries. The callback can be used, if entries are passed in, too (to select a special entry and not an enry of the opening submenu). --But usually it should be nil if entries are specified, as each entry in entries got it's own callback then. --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) -- --Example - Normal entry without submenu --AddCustomScrollableMenuEntry("Test entry 1", function() d("test entry 1 clicked") end, LibScrollableMenu.LSM_ENTRY_TYPE_NORMAL, nil, nil) --Example - Normal entry with submenu --AddCustomScrollableMenuEntry("Test entry 1", function() d("test entry 1 clicked") end, LibScrollableMenu.LSM_ENTRY_TYPE_NORMAL, { -- [1] = { -- label = "Test submenu entry 1", --optional String or function returning a string. If missing: Name will be shown and used for clicked callback value -- name = "TestValue1" --String or function returning a string if label is givenm name will be only used for the clicked callback value -- isHeader = false, -- optional boolean or function returning a boolean Is this entry a non clickable header control with a headline text? -- isDivider = false, -- optional boolean or function returning a boolean Is this entry a non clickable divider control without any text? -- isCheckbox = false, -- optional boolean or function returning a boolean Is this entry a clickable checkbox control with text? -- isNew = false, -- optional booelan or function returning a boolean Is this entry a new entry and thus shows the "New" icon? -- entries = { ... see above ... }, -- optional table containing nested submenu entries in this submenu -> This entry opens a new nested submenu then. Contents of entries use the same values as shown in this example here -- contextMenuCallback = function(ctrl) ... end, -- optional function for a right click action, e.g. show a scrollable context menu at the menu entry -- } --}, --[[additionalData]] -- { isNew = true, normalColor = ZO_ColorDef, highlightColor = ZO_ColorDef, disabledColor = ZO_ColorDef, highlightTemplate = "ZO_SelectionHighlight", -- font = "ZO_FontGame", label="test label", name="test value", enabled = true, checked = true, customValue1="foo", cutomValue2="bar", ... } -- --[[ Attention: additionalData keys which are maintained in table LSMOptionsKeyToZO_ComboBoxOptionsKey will be mapped to ZO_ComboBox's key and taken over into the entry.data[ZO_ComboBox's key]. All other "custom keys" will stay in entry.data.additionalData[key]! ]] --) function AddCustomScrollableMenuEntry(text, callback, entryType, entries, additionalData) --Adds an entry having a submenu (or maybe nested submenues) in the entries table/entries function whch returns a table --> See examples for the table "entries" values above AddCustomScrollableMenuEntry --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableSubMenuEntry(text, entries) --Adds a divider line to the context menu entries --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuDivider() --Adds a header line to the context menu entries --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuHeader(text, additionalData) --Adds a checkbox line to the context menu entries --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuCheckbox(text, callback, checked, additionalData) --Pass in a table/function returning a table with predefined context menu entries and let them all be added in order of the table's number key --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function AddCustomScrollableMenuEntries(contextMenuEntries) --Populate a new scrollable context menu with the defined entries table/a functinon returning the entries. --Existing context menu entries will be reset, because ClearCustomScrollableMenu will be called! --You can add more entries later, prior to showing, via AddCustomScrollableMenuEntry / AddCustomScrollableMenuEntries functions too function AddCustomScrollableMenu(entries, options) --Set the options (visible rows max, etc.) for the scrollable context menu, or any passed in 2nd param comboBoxContainer -->See possible options above AddCustomScrollableComboBoxDropdownMenu function SetCustomScrollableMenuOptions(options, comboBoxContainer) --Show the custom scrollable context menu now at the control controlToAnchorTo, using optional options. --If controlToAnchorTo is nil it will be anchored to the current control's position below the mouse, like ZO_Menu does --Existing context menu entries will be kept (until ClearCustomScrollableMenu will be called) function ShowCustomScrollableMenu(controlToAnchorTo, options) --Hide the custom scrollable context menu and clear it's entries, clear internal variables, mouse clicks etc. function ClearCustomScrollableMenu() --Can be used within a callback function of any entry: --Run a callback function myAddonCallbackFunc passing in the entries of the opening menu/submneu of a clicked LSM context menu item -->Parameters of your function myAddonCallbackFunc must be: -->function myAddonCallbackFunc(userdata LSM_comboBox, userdata selectedContextMenuItem, table openingMenusEntries, ...) -->... can be any additional params that your function needs, and must be passed in to the ... of calling API function RunCustomScrollableMenuItemsCallback too! --->e.g. use this function in your LSM contextMenu entry's callback function, to call a function of your addon to update your SavedVariables -->based on the currently selected checkboxEntries of the opening LSM dropdown: --[[ AddCustomScrollableMenuEntry("Context menu Normal entry 1", function(comboBox, itemName, item, selectionChanged, oldItem) d('Context menu Normal entry 1') local function myAddonCallbackFunc(LSM_comboBox, selectedContextMenuItem, openingMenusEntries, customParam1, customParam2) --Loop at openingMenusEntries, get it's .dataSource, and if it's a checked checkbox then update SavedVariables of your addon accordingly --or do oher things --> Attention: Updating the entries in openingMenusEntries won't work as it's a copy of the data as the contextMenu was shown, and no reference! --> Updating the data directly would make the menus break, and sometimes the data would be even gone due to your mouse moving above any other entry --> wile the callbackFunc here runs end --Use LSM API func to get the opening control's list and m_sorted items properly so addons do not have to take care of that again and again on their own RunCustomScrollableMenuItemsCallback(comboBox, item, myAddonCallbackFunc, { LSM_ENTRY_TYPE_CHECKBOX }, true, "customParam1", "customParam2") end) ]] --If table/function returning a table parameter filterEntryTypes is not nil: --The table needs to have a number key and a LibScrollableMenu entryType constants e.g. LSM_ENTRY_TYPE_CHECKBOX as value. Only the provided entryTypes will be selected --from the m_sortedItems list of the parent dropdown! All others will be filtered out. Only the selected entries will be passed to the myAddonCallbackFunc's param openingMenusEntries. --If the param filterEntryTypes is nil: All entries will be selected and passed to the myAddonCallbackFunc's param openingMenusEntries. -- --If the boolean/function returning a boolean parameter fromParentMenu is true: The menu items of the opening (parent) menu will be returned. If false: The currently shown menu's items will be returned function RunCustomScrollableMenuItemsCallback(comboBox, item, myAddonCallbackFunc, filterEntryTypes, fromParentMenu, ...) ---Function to return the data of a LSM scrollList row. Params: userdata rowControl -->Returns the m_sortedItems.dataSource or m_data.dataSource or data of the rowControl, or an empty table {} function GetCustomScrollableMenuRowData(rowControl) -- API to set all buttons in a group based on Select all, Unselect All, Invert all. -->Used in "checkbox" buttonGroup to show the default context menu (if no custom contextmenu was provided!) at a control which provides the -->"Select all", "Deselect all" and "Invert selection" entries function LibScrollableMenu.SetButtonGroupState
Entry types: LSM_ENTRY_TYPE_NORMAL LSM_ENTRY_TYPE_DIVIDER LSM_ENTRY_TYPE_HEADER LSM_ENTRY_TYPE_CHECKBOX --Adds a new entry to the context menu entries with the shown text, which calls the callback function once clicked. --If entries is provided the entry will be a submenu having those entries. The callback can only be used if entries are passed in --but normally it should be nil in that case function AddCustomScrollableMenuEntry(text, callback, entryType, entries, isNew) --Adds an entry having a submenu (or maybe nested submenues) in the entries table function AddCustomScrollableSubMenuEntry(text, entries) --Adds a divider line to the context menu entries function AddCustomScrollableMenuDivider() --Pass in a table with predefined context menu entries and let them all be added in order of the table's number key function AddCustomScrollableMenuEntries(contextMenuEntries) --Set the options (visible rows max, etc.) for the scrollable context menu function SetCustomScrollableMenuOptions(options, scrollHelper) --Add a new scrollable context menu with the defined entries table. --You can add more entries later via AddCustomScrollableMenuEntry function too function AddCustomScrollableMenu(parent, entries, options) --Show the custom scrollable context menu now function ShowCustomScrollableMenu(controlToAnchorTo, point, relativePoint, offsetX, offsetY, options) --Hide the custom scrollable context menu and clear internal variables, mouse clicks etc. function ClearCustomScrollableMenu()
File Name |
Version |
Size |
Uploader |
Date |
2.3 |
73kB |
Baertram |
08/19/24 06:24 AM |
|
2.21 |
61kB |
Baertram |
06/02/24 01:51 PM |
|
2.2 |
62kB |
Baertram |
06/02/24 11:06 AM |
|
2.1.1 |
41kB |
Baertram |
04/29/24 03:37 PM |
|
2.1 |
41kB |
Baertram |
04/26/24 02:02 PM |
|
2.0 |
29kB |
Baertram |
03/21/24 05:38 AM |
|
1.9 |
28kB |
Baertram |
03/11/24 03:10 AM |
|
1.8 |
31kB |
Baertram |
02/26/24 03:42 AM |
|
1.7 |
27kB |
Baertram |
01/11/24 06:09 PM |
|
1.6 |
23kB |
Baertram |
12/10/23 11:26 AM |
|
1.5 |
23kB |
Baertram |
12/09/23 06:05 PM |
|
1.4 |
22kB |
Baertram |
11/13/23 02:59 PM |
|
1.3 |
22kB |
Baertram |
10/31/23 04:15 AM |
|
1.2 |
22kB |
Baertram |
10/30/23 03:56 AM |
|
1.1 |
7kB |
tomstock |
03/19/23 02:51 PM |
|
1.0 |
7kB |
01/24/23 03:57 PM |
Comment Options |
06/17/24, 02:00 PM | |
|
The whole situation has bean confusing. Maybe Beartram can make more sense out of it.
I'm not that familiar with this tool but, I put the saved variable in here. There's a lot of instances in it. Some with, some without, errors. https://sir.insidi.at/or/logviewer/YoeW8c The error we are seeing, well, should not really be possible. No matter how things are loaded. I mean, It says it must be parented to GuiRoot and, GuirRoot is what's passed in. This leads to believe that GuiRoot is being changed or, CreateControlFromVirtual is being modified to force specific parents, ignoring what's passed in. And, I don't see anything that does that. So confusing. One thought was, to have someone getting the error, change the CreateControlFromVirtual at that line to WINDOW_MANAGER:CreateControlFromVirtual It would do no good to us not getting the error. But that would only work if CreateControlFromVirtual is being modified not if WINDOW_MANAGER:CreateControlFromVirtual is. That is, "if" it is. Which, calling WINDOW_MANAGER:CreateControlFromVirtual is all CreateControlFromVirtual does. Lua Code:
As for changes on loading. I'm not actually sure how that works, beside depends on are forced to load some time after the depended on one does. According to the debug log, It's being caused after the lib is fully loaded. It creates it's own comboBox using the same functions. It would be erroring then. Now I'm just thinking out...loud...ish? The errors have been different, in a way. This so called parent has been shown as different controls. ZO_ActiveCombatTips ZO_ObjectiveCapture ZO_Tutorial So far, It looks like it's only been those 3. So confusing.
Last edited by IsJustaGhost : 06/17/24 at 02:46 PM.
|
|
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
seggert |
View Public Profile |
Send a private message to seggert |
Find More Posts by seggert |
Add seggert to Your Buddy List |
06/17/24, 10:40 AM | |
|
More often then not, Switching characters is going from 1 set of addons to another.
Got to ask. Are those recent test after this debugLog savedVariables?
Last edited by IsJustaGhost : 06/17/24 at 11:03 AM.
|
|
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
06/17/24, 08:56 AM | |||||
Forum posts: 0
File comments: 20
Uploads: 0
|
Okey now... For the sake of interest, I took to check the theory that the problem is in some kind of add-on. That is, when loading this add-on under the same conditions, the problem should be repeated.
Next will be longread...
--- What comes to mind - perhaps this error is associated with some kind of load delay, which occurs due to the large number of add-ons in the session? Once closing the client fixes the problem, even if before that it did not disappear when the interface was rebooted - perhaps the problem lies not at all in the add-ons, but in how the client works with them now. But how to catch such a "floating" problem - any ideas?
Last edited by seggert : 06/17/24 at 11:41 AM.
|
||||
|
seggert |
View Public Profile |
Send a private message to seggert |
Find More Posts by seggert |
Add seggert to Your Buddy List |
06/16/24, 04:00 PM | |
|
This is in regards to everyone having this issue
Sound to me like a popular addon got update. None should really need any knowledge of lua coding to understand this. Now look at all the common factors in these errors reported. Line Number 2095 in file LibScrollableMenu.lua calls CreateControlFromVirtual [C]: in function 'CreateControlFromVirtual' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2095: in function 'dropdownClass:Initialize' The image above shows that line number on the bottom left. CreateControlFromVirtual(name, parent, templateName, optionalNameSuffix) The only part in question here is parent, which is clearly GuiRoot The error states " it must be parented to GuiRoot" LibScrollableMenu is specifically anchoring it to GuiRoot as seen in the image And this is how the function is defined in the game. Lua Code:
I'm not against fixing reported issues. And I often apply a fix and post it the same day I receive a report. Tho, it may take longer if it requires changes do to addon incompatibilities, which would require more correspondences. However, it is almost guaranteed that I will not receive this error. For one, I have only ever played in Gamepad mode, Which limits most of my addons to ones I had created. The likelyhood that I would ever install an addon that manipulates the ui, is next to 0%. "Next to", because I use a personally modded Bandits Ui. Anyway, enough of the rant. As shown above, LibScrollableMenu is anchoring this properly, to GuiRoot. We have absolutely no control over any addons that may interfere with that. Besides, insisting them to stop. But, we must know what that addon is. Knowing that, We can find out how it is causing it to break and provide guidance to the author in fixing the issue. Clerification of the error As seen, AdvancedFilters is only using AddCustomScrollableComboBoxDropdownMenu. If there was an error from it, it would have happend there. From then on, it's all LibScrollableMenu. Code:
-- Here it says the parent 'ud' is ZO_ActiveCombatTips, Well, we aleady know it's a proper control based on below "parent = ud" -- But, it's not the GuiRoot LibScrollableMenu supplied to CreateControlFromVirtual TopLevelControl AF_FilterBarJewelryCraftingRefine_JEWELRY_RefineJewelryCraftingStationDropdownFilter1 cannot be parented to ZO_ActiveCombatTips, it must be parented to GuiRoot stack traceback: [C]: in function 'CreateControlFromVirtual' /EsoUI/Libraries/Globals/GlobalVars.lua:18: in function 'CreateControlFromVirtual' -- it only tells us here the parent is a UI ontrol. "ud" or "userdata" <Locals> name = "AF_FilterBarJewelryCraftingRef...", parent = ud, templateName = "LibScrollableMenu_Dropdown_Tem...", optionalNameSuffix = 1 </Locals>|r -- here we know the line number in LibScrollableMenu.lua from where the above is called from is 2095 user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2095: in function 'dropdownClass:Initialize' -- nothing between here matters -- AdvancedFilters sends it's comboBox to be updated by LibScrollableMenu user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:4047: in function 'AddCustomScrollableComboBoxDropdownMenu' -- nothing between here matters -- AdvancedFilters was just officially loaded by the game. user:/AddOns/AdvancedFilters/AdvancedFilters.lua:2395: in function 'AdvancedFilters_Loaded'
Last edited by Baertram : 06/16/24 at 05:47 PM.
|
|
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
06/16/24, 02:36 PM | |||
|
Good find, could be an issue there, yes, but not for this error message!
It would make me wonder why the internal LSM would change the parent of the drodpown (thats the list that opens as you click the combobox) based on that passed in parameter... At least selfVar was there to be used so it's a good find! Edit: No, after checking it selfVar was only assigned for the local functions inside that class method and it is used there (e.g. local function invertDropdownEntryAndCallCallback). Everything else is using self properly which points to object of AF_FilterBar So using self there is totally okay afaik see. And if you watch this comment:
And other addons overwriting self could actually be an issue but that would raise errors before already if self is not pointing to AF_FilterBar object anymore (e.g. Trying to index a nil value, or function expected but got nil). In ESOUI you create an object via myObject = ClassName:New() That calls the ClassName:Initialize() function In those you use self as reference to the created object Lua Code:
That's why I said you need to test with ONLY AF enabled, all other off. And if the error is gone you know already it is not AF or AS or LSM! It's some other addon interfering here. In addition the fact is that the error message is from a CreatControlFromVirtual call in LSM. -> That passes in the parent "GuiRoot "hardcoded", always, never changed! Code:
local dropdownControl = CreateControlFromVirtual(comboBoxContainer:GetName(), GuiRoot, "LibScrollableMenu_Dropdown_Template", depth) So whatever is the reason here is either something that we cannot find yet or some other addon messing with GuiRoot or CreateControlFromVirtual function, or I'm out of ideas But thanks again for your ideas, really appreciated.
Last edited by Baertram : 06/16/24 at 02:58 PM.
|
||
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
06/16/24, 02:34 PM | ||
Forum posts: 0
File comments: 26
Uploads: 0
|
|
|
|
g0thicicecream |
View Public Profile |
Send a private message to g0thicicecream |
Find More Posts by g0thicicecream |
Add g0thicicecream to Your Buddy List |
06/16/24, 02:32 PM | |
Forum posts: 0
File comments: 26
Uploads: 0
|
As a side note, I don't understand why selfVar is getting assigned to self but is never used in AF_FilterBar:Initialize.
I don't do modding for ESO, but from a programmer's view of the code, I see the point of assigning selfVar to self at the beginning of the function, to avoid losing the "self" object for some other reason while working, but it appears it's not being used anywhere, which makes assigning selfVar pointless the way it's written. (again just from a programmer's perspective, not having much experience with modding eso) Perhaps since AF is calling AddCustomScrollableComboBoxDropdownMenu with "self" but not selfVar, swapping everything in Initialize to reference selfVar instead of self is the way to fix it? I just went through advanced filters and changed all the code referencing "self" in AF_FilterBar:Initialize to selfVar instead up to the point of AddCustomScrollableComboBoxDropdownMenu (I didn't go further than that) and it appears to be working fine now - but who knows, the occurrence of this error can be a little random. I have had instances where it just doesn't happen at all. It seems most likely to happen right after starting ESO for the first time then switching characters. Anyways, making that change to Advanced Filters seems to have corrected my issue SO FAR...can't say that it's going to be the fix, but it appears to have done the trick. I don't know how ESO handles "self" inside of functions, but to me it seems like it's getting overwritten while processing the initialize by something else. I would think that's a reserved word in lua and has special handling around it. It could be some other mod decided to name a variable "self" or ZOS, and is overwriting? I mean that seems a little silly to me, but you never know.
Last edited by g0thicicecream : 06/16/24 at 02:37 PM.
|
|
g0thicicecream |
View Public Profile |
Send a private message to g0thicicecream |
Find More Posts by g0thicicecream |
Add g0thicicecream to Your Buddy List |
06/16/24, 02:22 PM | |||
|
Thanks for the nfo, very appreciated.
What I did not read from your post: Did you test with only AdvancedFilters enabled + LSM and needed dependencies? All other addons turned off. If the error then still happens, please describe me how to get that. Also tell me what settings you use in AdvancedFilters then -> All of them. Will setup it the same way and gladly test it. Reason I ask that: Your understanding is quite rright except the fact that LSM is not parenting itsself to any ZO* whatever control. That cannot be as LSM is hardcoding the call to GuiRoot internally (same like ZO_ComboBox does it!). Neither AF nor AS is passing in a parent control that it should be parented to. That error could happen with any addon using LSM (-> API func, you mentioned AddCustomScrollableComboBoxDropdownMenu), also Improved Titleizer, MerTorchbug. Not only AS and AF. The fact is: All of the addons do not produce any error here for many players, including the 2 devs of LSM (Ghost an me). Only a few ones have that weird issue and for us it looks like you got any additional addon enabled that causes this. -> Maybe you guys having the issue talk with each other and find out which one you got enabled/installed in common! But any other addon (or whatever happens here) that messes with GuiRoot control maybe. None of the controls mention that LSM is trying to parent to is either used in AS, AF nor LSM (ZO_ObjectiveCapture, ZO_Tutorial, ZO_ActiveCombatTips, ...). These all make no sense as they are no cotnrols that could be parented to but "classes" of ZOs (where obects get created from, which then would have a control).
Last edited by Baertram : 06/16/24 at 02:32 PM.
|
||
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
06/16/24, 01:56 PM | ||
Forum posts: 0
File comments: 26
Uploads: 0
|
I went through and got rid of all my addons and only reinstalled the ones I need, got rid of addon selector since I really don't use it.
Definitely advanced filters, no other addon that I have makes a call to AddCustomScrollableComboBoxDropdownMenu. After turning on advanced debug, I got 117 pages of debug info all from advanced filters, so something is up with that addon and calling AddCustomScrollableComboBoxDropdownMenu. It appears these controls are trying to have a parent of ZO_ActiveCombatTips from the 117 error messages - they're all the same, all referencing having a parent of ZO_ActiveCombatTips. From the errors others have posted, it's almost like the parent is getting overwritten or "guessed" wrong when creating the control. I wouldn't be surprised if there's some weird memory leak going on. Here's more detailed debug on the first error encountered: Code:
TopLevelControl AF_FilterBarJewelryCraftingRefine_JEWELRY_RefineJewelryCraftingStationDropdownFilter1 cannot be parented to ZO_ActiveCombatTips, it must be parented to GuiRoot stack traceback: [C]: in function 'CreateControlFromVirtual' /EsoUI/Libraries/Globals/GlobalVars.lua:18: in function 'CreateControlFromVirtual' <Locals> name = "AF_FilterBarJewelryCraftingRef...", parent = ud, templateName = "LibScrollableMenu_Dropdown_Tem...", optionalNameSuffix = 1 </Locals>|r user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2095: in function 'dropdownClass:Initialize' <Locals> self = [table:1]{}, parent = [table:2]{m_nextFree = 2, visibleRows = 10, m_name = "AF_FilterBarJewelryCraftingRef...", horizontalAlignment = 0, visibleRowsSubmenu = 10, m_font = "ZoFontGame", m_containerWidth = 104, m_enableMultiSelect = F, m_spacing = 0, baseEntryHeight = 25, m_isDropdownVisible = F, m_height = 250, m_sortOrder = T, m_highlightTemplate = "ZO_SelectionHighlight", disableFadeGradient = F, m_sortsItems = F}, comboBoxContainer = ud, depth = 1 </Locals> /EsoUI/Libraries/Utility/BaseObject.lua:252: in function 'ZO_InitializingObject:New' <Locals> self = [table:3]{__isAbstractClass = F}, newObject = [table:1] </Locals> tail call): ? user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2718: in function 'comboBox_base:Initialize' <Locals> self = [table:2], parent = ud, comboBoxContainer = ud, options = [table:4]{visibleRowsDropdown = 15, sortEntries = F, font = "ZoFontGameSmall", visibleRowsSubmenu = 15}, depth = 1 </Locals> user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3412: in function 'comboBoxClass:Initialize' <Locals> self = [table:2], parent = ud, comboBoxContainer = ud, options = [table:4], depth = 1, initExistingComboBox = T </Locals> user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3667: in function 'comboBoxClass:UpdateMetatable' <Locals> self = [table:2], parent = ud, comboBoxContainer = ud, options = [table:4] </Locals> user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:4047: in function 'AddCustomScrollableComboBoxDropdownMenu' <Locals> parent = ud, comboBoxContainer = ud, options = [table:4], comboBox = [table:2] </Locals> user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:254: in function 'AF_FilterBar:Initialize' <Locals> self = [table:5]{name = "JewelryCraftingRefine_JEWELRY_...", libFilters_filterType = 31}, inventoryName = "JewelryCraftingRefine", tradeSkillname = "_JEWELRY_", groupName = "RefineJewelryCraftingStation", subfilterNames = [table:6]{1 = "RawMaterialJewelry"}, settings = [table:7]{}, offsetY = 0, parents = [table:8]{}, parent = ud, selfVar = [table:5], AF_FilterBarName = "JewelryCraftingRefine_JEWELRY_...", allText = "All", settings = [table:7] </Locals> user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:180: in function 'AF_FilterBar:New' <Locals> self = [table:9]{__isAbstractClass = F}, libFiltersFiltertype = 31, inventoryName = "JewelryCraftingRefine", tradeSkillname = "_JEWELRY_", groupName = "RefineJewelryCraftingStation", subfilterNames = [table:6], obj = [table:5] </Locals> user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:1533: in function 'AF.CreateSubfilterBars' <Locals> doDebugOutput = T, debugSpam = F, inventoryNames = [table:10]{32 = "JewelryCraftingCreate"}, tradeSkillNames = [table:11]{0 = "_"}, filterTypeNames = [table:12]{0 = "All"}, subfilterGroups = [table:13]{}, subfilterButtonNames = [table:14]{}, inventoryType = 31, tradeSkillTypeSubFilterGroup = [table:15]{}, doDebug = F, tradeSkillType = 7, subfilterGroup = [table:16]{}, itemFilterType = 42, _ = [table:17]{}, libFiltersFilterType = 31 </Locals> user:/AddOns/AdvancedFilters/AdvancedFilters.lua:2395: in function 'AdvancedFilters_Loaded' <Locals> eventCode = 65536, addonName = "AdvancedFilters" </Locals>
Last edited by g0thicicecream : 06/16/24 at 02:17 PM.
|
|
|
g0thicicecream |
View Public Profile |
Send a private message to g0thicicecream |
Find More Posts by g0thicicecream |
Add g0thicicecream to Your Buddy List |
06/16/24, 12:07 PM | ||
|
Re: similar error
Then please test if the error goes away if you disable AdvancedFilters.
I bet it does not... It's neither AS nor AF causing this. IF the error comes with LSM and AF and AS (only these 3 + needed dependencies enabled), which I really doubt as it cannot be, then I can do something. But I have tested it up and down meanwhile and NEVER ever get that problem. And I've asked my 5 guilds and there are more than 250 palyers that never ever get this error message and they use AF, AS, AF + AS all day. So it must be any other addon you guys got enabled, that does that What you guys never tell me is the important thing: Disable ALL other addons, only use Addon Selector OR AdvancedFilters (or both, but no other addons!) and LibScrollableMenu. Does that work fine? If so your other enabled addons are causing it somehow and we cannot do anything about this. YOU need to find out the causing addon then as I do not know what addons you use or what settings your addons got enabled or not etc. Thanks for testing this on your client.
Last edited by Baertram : 06/16/24 at 12:31 PM.
|
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
06/16/24, 10:33 AM | |
Forum posts: 0
File comments: 64
Uploads: 0
|
similar error
Well I get a similar error. I do not use "No Thank you", I do not have "advanced Filters" installed:
TopLevelControl AddonSelectorddl1 cannot be parented to ZO_Tutorial, it must be parented to GuiRoot stack traceback: [C]: in function 'CreateControlFromVirtual' /EsoUI/Libraries/Globals/GlobalVars.lua:18: in function 'CreateControlFromVirtual' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2095: in function 'dropdownClass:Initialize' /EsoUI/Libraries/Utility/BaseObject.lua:252: in function 'ZO_InitializingObject:New' (tail call): ? user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2718: in function 'comboBox_base:Initialize' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3412: in function 'comboBoxClass:Initialize' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3667: in function 'comboBoxClass:UpdateMetatable' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:4047: in function 'AddCustomScrollableComboBoxDropdownMenu' user:/AddOns/AddonSelector/AddonSelector.lua:3577: in function 'AddonSelector.CreateControlReferences' user:/AddOns/AddonSelector/AddonSelector.lua:4001: in function 'AddonSelector.Initialize' user:/AddOns/AddonSelector/AddonSelector.lua:4281: in function 'OnAddOnLoaded' Would be glad for help Btw: I cant use the scrollmenu in Addon Selector any more.
Last edited by Fly : 06/16/24 at 11:33 AM.
|
|
Fly |
View Public Profile |
Send a private message to Fly |
Find More Posts by Fly |
Add Fly to Your Buddy List |
06/16/24, 09:27 AM | ||
|
Do you use "No Thank You" addon as the error happens (on the 2nd character logged in), as the user below your post mentioned it would be related to this addon?
Do you get any error messages with that character? Check with LibdebugLogger and DebugLogger addon to see error messages that occur before chat is ready. Then please disable it and check if the error is gone! It needs to be fixed in other addons. LSM cannot fix that error, it's working fine and exactly the same as ZOs code of comboboxes and dropdowns work.
Last edited by Baertram : 06/16/24 at 09:30 AM.
|
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
06/16/24, 09:25 AM | |
Forum posts: 0
File comments: 26
Uploads: 0
|
I always get this error after logging off the first character I get on for the day then log into the second character. The second character produces this error. This is what I usually do:
1. Login on the first character to do daily crafting writs in West Weald 2. Do all the daily crafting writs, deconstruct with assistant, sell to merchant assistant, use bank assistant to deposit rewards and money 3. Log out 4. Log into the next character (same zone) and this always happens The addons I have that require this are (based on enabling/disabling the addon): Addon Selector Advanced Filters LibCustomMenu (maybe based on search of all addons .lua) Code:
TopLevelControl AF_FilterBarPlayerInventory_AllDropdownFilter1 cannot be parented to ZO_Tutorial, it must be parented to GuiRoot stack traceback: [C]: in function 'CreateControlFromVirtual' /EsoUI/Libraries/Globals/GlobalVars.lua:18: in function 'CreateControlFromVirtual' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2095: in function 'dropdownClass:Initialize' /EsoUI/Libraries/Utility/BaseObject.lua:252: in function 'ZO_InitializingObject:New' (tail call): ? user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2718: in function 'comboBox_base:Initialize' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3412: in function 'comboBoxClass:Initialize' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3667: in function 'comboBoxClass:UpdateMetatable' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:4047: in function 'AddCustomScrollableComboBoxDropdownMenu' user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:254: in function 'AF_FilterBar:Initialize' user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:180: in function 'AF_FilterBar:New' user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:1533: in function 'AF.CreateSubfilterBars' user:/AddOns/AdvancedFilters/AdvancedFilters.lua:2395: in function 'AdvancedFilters_Loaded' |
|
g0thicicecream |
View Public Profile |
Send a private message to g0thicicecream |
Find More Posts by g0thicicecream |
Add g0thicicecream to Your Buddy List |
06/16/24, 06:55 AM | |
Forum posts: 0
File comments: 20
Uploads: 0
|
Got (looks) similar problem as ozveryashka
Code:
TopLevelControl AF_FilterBarSmithingImprovement_WOODWORKING_ArmorWoodworkingDropdownFilter1 cannot be parented to ZO_ObjectiveCapture, it must be parented to GuiRoot stack traceback: [C]: in function 'CreateControlFromVirtual' /EsoUI/Libraries/Globals/GlobalVars.lua:18: in function 'CreateControlFromVirtual' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2095: in function 'dropdownClass:Initialize' /EsoUI/Libraries/Utility/BaseObject.lua:252: in function 'ZO_InitializingObject:New' (tail call): ? user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:2718: in function 'comboBox_base:Initialize' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3412: in function 'comboBoxClass:Initialize' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:3667: in function 'comboBoxClass:UpdateMetatable' user:/AddOns/LibScrollableMenu/LibScrollableMenu.lua:4047: in function 'AddCustomScrollableComboBoxDropdownMenu' user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:254: in function 'AF_FilterBar:Initialize' user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:180: in function 'AF_FilterBar:New' user:/AddOns/AdvancedFilters/files/FilterBar/AF_FilterBar.lua:1533: in function 'AF.CreateSubfilterBars' user:/AddOns/AdvancedFilters/AdvancedFilters.lua:2395: in function 'AdvancedFilters_Loaded' Additional LUA-errors that appeared on load (up to similar to 1st 120 errors in a row), except one that pointed to that decision: Code:
/EsoUI/Libraries/Utility/ZO_PlatformUtils.lua:123: Attempt to access a private function 'IsInUI' from insecure code. The callstack became untrusted 13 stack frame(s) from the top. stack traceback: /EsoUI/Libraries/Utility/ZO_PlatformUtils.lua:123: in function 'ZO_IsPregameUI' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:411: in function 'ZO_ErrorFrame:RefreshButtons' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:358: in function 'ZO_ErrorFrame:SetCurrentError' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:36: in function 'callback' /EsoUI/Libraries/Utility/ZO_CallbackObject.lua:132: in function 'ZO_CallbackObjectMixin:FireCallbacks' /EsoUI/Libraries/ZO_Spinner/ZO_Spinner.lua:312: in function 'ZO_Spinner:SetValue' /EsoUI/Libraries/ZO_Spinner/ZO_Spinner.lua:206: in function 'ZO_Spinner:SetValueMinAndMax' /EsoUI/Libraries/ZO_Spinner/ZO_Spinner.lua:213: in function 'ZO_Spinner:SetMinMax' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:313: in function 'ZO_ErrorFrame:RefreshPageSpinner' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:402: in function 'ZO_ErrorFrame:RefreshButtons' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:358: in function 'ZO_ErrorFrame:SetCurrentError' /EsoUI/Common/ZO_UIErrors/ErrorFrame.lua:374: in function 'ZO_ErrorFrame:OnUIError' user:/AddOns/NoThankYou/NoThankYou.lua:1271: in function 'keyboardAcceptCallback' user:/AddOns/LibNotification/LibNotification.lua:91: in function 'libNotificationKeyboardProvider:Accept' /EsoUI/Ingame/Contacts/Notifications_Common.lua:1879: in function 'ZO_NotificationManager:AcceptRequest' /EsoUI/Ingame/Contacts/Keyboard/Notifications_Keyboard.lua:626: in function 'ZO_KeyboardNotificationManager:Accept_OnClicked' /EsoUI/Ingame/Contacts/Keyboard/Notifications_Keyboard.lua:707: in function 'ZO_NotificationsTwoButtonAccept_OnClicked' ZO_NotificationsList1Row1Accept_Clicked:3: in function '(main chunk)' it's sad, but both listed addons looks like abandoned by authors, but was very useful in some situations and looks like don't have adequate analogs...
Last edited by seggert : 06/16/24 at 07:20 AM.
|
|
seggert |
View Public Profile |
Send a private message to seggert |
Find More Posts by seggert |
Add seggert to Your Buddy List |