Download
(8 Kb)
Download
Updated: 03/13/23 03:24 PM
Pictures
File Info
Compatibility:
Scribes of Fate (8.3.5)
Firesong (8.2.5)
Updated:03/13/23 03:24 PM
Created:07/11/15 10:51 AM
Monthly downloads:43,140
Total downloads:4,379,606
Favorites:1,969
MD5:
LibCustomMenu  Popular! (More than 5000 hits)
Version: 7.2.1
by: votan [More]
Info
This library is for addon developers. Download it, if an addon dependency tells you so.

Description
This library is written to overcome one way to get the "Access a private function XYZ from insecure code". But beginning with version 2.0, it does additional provide a new feature: sub menus.
Beginning with version 3.0, it does additional provide a new feature: divider.

Background
Controls, created from add-on code (as part of code path) are marked as "insecure/compromissed".
Functions, which have no problem with been called from "insecure" controls, are still working perfectly.
Like those of add-ons or Show On Map, Link in Chat or Get Help.
But "secured" functions like UseItem, InitiateDestroy, PickupInventoryItem raising the error message from above.
Once you hook AddMenuItem ALL controls created for the context-menu are "insecure".

Prior to ESO 2.0.13 if an add-on offers a full custom context-menu (no built-in menu entries) and this context-menu is shown first after (re-)load UI the first menu item controls are insecure. A crash of "Use" in the inventory afterwards was guaranteed.
Starting with ESO 2.0.13 ZOS preallocates 10 "secure" menu items. See here.
But this just reduces the chance of running into that problem, it does not fix it.
Currently the number of preallocated controls is 30. Running into this problem with AddMenuItem is real rare, but inventory action slots still don't like custom menu entries.

To avoid the error message, the controls of built-in menu items and add-on menu items must be strictly separated. That's what AddCustomMenuItem of this library does. It uses an own pool of controls, which look exactly the same. Sounds strange, but works.

I don't use private functions. Why should I use this lib?
It's not you, who uses private functions. It is built-in code, which re-uses controls indirectly created by your add-on in AddMenuItem.

I want to use this lib, so what to do?
After you have included the lib in your add-on manifest (.txt) do a text search for the global function AddMenuItem (not any :AddMenuItem of other objects) and replace it with AddCustomMenuItem.
Be careful with a simple "Replace All" over all files! You probably replace the AddMenuItem of LibCustomMenu itself

Version 1.0
This version was intended as proof of concept, but was successfully used in Beartram's FCO Item Saver, Circonian's FilterIt and my Fish Fillet.

Version 2.0
In order to have more value than avoiding a rare, just annoying "bug", sirinsidiator suggested and provided proof of concept code for sub menu items.
A big thank to sirinsidiator!
I finalized it and here we are.

API 2.0
function AddCustomMenuItem(mytext, myfunction, itemType, myfont, normalColor, highlightColor, itemYPad)

Fully compatible with AddMenuItem.
mytext: string, required. Caption of menu item.
myfunction: function(), required. Called if clicked.
itemType: int, optional. MENU_ADD_OPTION_LABEL or MENU_ADD_OPTION_CHECKBOX. Default MENU_ADD_OPTION_LABEL.
myfont: string, optional.
normalColor: ZO_ColorDef, optional. Color of unselected item.
highlightColor: ZO_ColorDef, optional. Color of selected/hovered item.
itemYPad: int, optional. y-padding between items.


function AddCustomSubMenuItem(mytext, entries, myfont, normalColor, highlightColor, itemYPad, subMenuButtonCallbackFunc)

mytext: string, required. Caption of menu item.
entries: table of sub items or callback returning table of sub items, required.
myfont: string, optional.
normalColor: ZO_ColorDef, optional. Color of unselected/normal sub item.
highlightColor: ZO_ColorDef, optional. Color of selected/hovered sub item.
itemYPad: int, optional. y-padding between sub items.
subMenuButtonCallbackFunc: function, optional. Callback function for the click on the submenu open button (the one at the main menu showing the submenu)

sub item:
label: string or function(rootMenu, childControl), required.
callback: function(), required.
disabled: boolean or function(rootMenu, childControl), optional. Default false. if true, sub item is visible, but gray and not clickable.
visible: boolean or function(rootMenu, childControl), optional. Default true.

These examples are for self-created menus. If you want to add items to the inventory context-menu, look at the example for LibCustomMenu:RegisterContextMenu more below.

example 1:
Lua Code:
  1. local entries = {
  2.   {
  3.     label = "Test 1",
  4.     callback = function() d("Test 1") end,
  5.   },
  6.   {
  7.     label = "Test 2",
  8.     callback = function() d("Test 2") end,
  9.     disabled = function(rootMenu, childControl) return true end,
  10.   }
  11. }
  12. ClearMenu()
  13. AddCustomSubMenuItem("Sub Menu", entries)
  14. ShowMenu()

example 2:
Lua Code:
  1. local function GetEntries(rootMenu)
  2. d("run")
  3. return {
  4.   {
  5.     label = function() return GetTimeStamp() end,
  6.     callback = function() d("Test 1") end,
  7.   },
  8.   {
  9.     label = "Test 2",
  10.     callback = function() d("Test 2") end,
  11.     disabled = function(rootMenu, childControl) return true end,
  12.   }
  13. }
  14. end
  15. ClearMenu()
  16. AddCustomSubMenuItem("Sub Menu", GetEntries)
  17. ShowMenu()
If you have Notebook or ZAM Notebook, you could copy&paste the scripts from above and execute them.

API 3.0
In addition to API 2.0:
Allow divider by setting member label to a static "-". Suggested by Beartram.

example:
Lua Code:
  1. local entries = {
  2.   {
  3.     label = "Test 1",
  4.     callback = function() d("Test 1") end,
  5.   },
  6.   {
  7.     label = "-",
  8.   },
  9.   {
  10.     label = "Test 2",
  11.     callback = function() d("Test 2") end,
  12.     disabled = function(rootMenu, childControl) return true end,
  13.   }
  14. }
  15. ClearMenu()
  16. AddCustomSubMenuItem("Sub Menu", entries)
  17. ShowMenu()

API 4.1
In addition to API 3.0:
actionSlots:AddCustomSlotAction(actionStringId, actionCallback, actionType, visibilityFunction, options)

for example while hooking ZO_InventorySlot_DiscoverSlotActionsFromActionList(inventorySlot, slotActions)
for example within the callback of API 6.0. See below.

API 5.0
In addition to API 4.1+:
New entry properties itemType and checked.
itemType = MENU_ADD_OPTION_LABEL (default) or MENU_ADD_OPTION_CHECKBOX for a checkbox
checked = false/true or function() return state end
The initial checked state than opening the sub menu.

example:
Lua Code:
  1. local myState = true
  2.     local entries = {
  3.       {
  4.         label = "Test 1",
  5.         callback = function(state) myState = state df("Test 1: %s", tostring(myState)) end,
  6.         checked = function() return myState end,
  7.         itemType = MENU_ADD_OPTION_CHECKBOX,
  8.       },
  9.       {
  10.         label = "Test 1b",
  11.         callback = function() d("Test 1b") end,
  12.         itemType = MENU_ADD_OPTION_LABEL,
  13.       },
  14.       {
  15.         label = "-",
  16.       },
  17.       {
  18.         label = "Test 2",
  19.         callback = function() d("Test 2") end,
  20.         disabled = function(rootMenu, childControl) return true end,
  21.       }
  22.     }
  23.     ClearMenu()
  24.     AddCustomSubMenuItem("Sub Menu", entries)
  25.     ShowMenu()

API 6.2
In addition to API 5+:
Added callbacks, you can register to, to hook into inventory slot context menu. You don't need to reinvent the hook and are able to control the position of your entry/entries more granular.

category
lib.CATEGORY_EARLY
lib.CATEGORY_PRIMARY
lib.CATEGORY_SECONDARY
lib.CATEGORY_TERTIARY
lib.CATEGORY_QUATERNARY
lib.CATEGORY_LATE

CATEGORY_EARLY is before the first built-in menu entry.
CATEGORY_PRIMARY is after the first built-in menu entry. And so on.
CATEGORY_LATE is after built-in menu and default.

lib:RegisterContextMenu(func, category)
Register to the context menu of the inventory mouse right click.

lib:RegisterKeyStripEnter(func, category)
Register to the inventory mouse hover used to update the keybind buttons at the bottom.

func: callback function to be called.
Signature:
Lua Code:
  1. local function func(inventorySlot, slotActions)
  2. end

category: optional. defaults to CATEGORY_LATE.

lib:RegisterKeyStripExit(func)
Register to the inventory mouse hover used to update the keybind buttons at the bottom, if the mouse exits an inventory slot.

func: callback function to be called.
Signature:
Lua Code:
  1. local function func()
  2. end

example:
Lua Code:
  1. ZO_CreateStringId("SI_BINDING_NAME_SHOW_POPUP", "Show in Popup")
  2. local function AddItem(inventorySlot, slotActions)
  3.   local valid = ZO_Inventory_GetBagAndIndex(inventorySlot)
  4.   if not valid then return end
  5.   slotActions:AddCustomSlotAction(SI_BINDING_NAME_SHOW_POPUP, function()
  6.     local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
  7.     local itemLink = GetItemLink(bagId, slotIndex)
  8.     ZO_PopupTooltip_SetLink(itemLink)
  9.   end , "")
  10. end
  11.  
  12. LibCustomMenu:RegisterContextMenu(AddItem, LibCustomMenu.CATEGORY_PRIMARY)

example 2:
Lua Code:
  1. local function AddItem(inventorySlot, slotActions)
  2.   local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
  3.   if not CanItemBePlayerLocked(bagId, slotIndex) then return end
  4.   local locked = IsItemPlayerLocked(bagId, slotIndex)
  5.  
  6.   slotActions:AddCustomSlotAction(locked and SI_ITEM_ACTION_UNMARK_AS_LOCKED or SI_ITEM_ACTION_MARK_AS_LOCKED, function()
  7.     SetItemIsPlayerLocked(bagId, slotIndex, not locked)
  8.   end, "keybind2")
  9.   -- you can use: "primary", "secondary", "keybind1", "keybind2"
  10. end
  11.  
  12. local menu = LibCustomMenu
  13. --menu:RegisterContextMenu(AddItem, menu.CATEGORY_PRIMARY)
  14. menu:RegisterKeyStripEnter(AddItem, menu.CATEGORY_LATE)
Not really practical, because it hides the built-in keybind.
But you could use the callback just to be notified as well.

API 6.8
In addition to API 6.2+:
Added functionality to add an optional tooltip to a menu entry.
For the top level menu entries there is a new global function:
function AddCustomMenuTooltip(tooltip, index)
tooltip: Either a string shown as a simple tooltip or a callback function to let you do everything.
Signature:
Lua Code:
  1. local function func(control, inside)
  2. end
control: the menu entry control.
inside: The function is called on mouse enter with inside=true and on mouse exit with inside=false.

index: Optional. Index of the menu entry, the tooltip is for. By default the index of the last added item is used. => You call AddCustomMenuItem and when AddCustomMenuTooltip.

For sub-menus a new key "tooltip" can be used. Again it is either a string or the callback function with the signature from above.

example:
Lua Code:
  1. local myState = true
  2.     local entries = {
  3.       {
  4.         label = "Test 1",
  5.         callback = function(state) myState = state df("Test 1: %s", tostring(myState)) end,
  6.         checked = function() return myState end,
  7.         itemType = MENU_ADD_OPTION_CHECKBOX,
  8.         tooltip = "This is Test 1",
  9.       },
  10.       {
  11.         label = "Test 1b",
  12.         callback = function() d("Test 1b") end,
  13.         itemType = MENU_ADD_OPTION_LABEL,
  14.         tooltip = "This is Test 2",
  15.       },
  16.       {
  17.         label = "-",
  18.       },
  19.       {
  20.         label = "Test 2",
  21.         callback = function() d("Test 2") end,
  22.         disabled = function(rootMenu, childControl) return true end,
  23.       }
  24.     }
  25.     ClearMenu()
  26.     AddCustomSubMenuItem("Sub Menu", entries)
  27.     AddCustomMenuTooltip("A sub-menu")
  28.     AddCustomMenuItem("-", function() d("soso") end)
  29.     AddCustomMenuItem("Button", function() d("jojo") end)
  30.     AddCustomMenuTooltip(function(control, inside) if inside then d("A great button") end end)
  31.     AddCustomMenuItem("CheckBox", function() d("soso") end, MENU_ADD_OPTION_CHECKBOX)
  32.     ShowMenu()
How to use Checkbox at top level
Lua Code:
  1. local index = AddCustomMenuItem("CheckBox", function() <your callback> end, MENU_ADD_OPTION_CHECKBOX)
  2. if needToCheckIt then
  3.     ZO_CheckButton_SetChecked(ZO_Menu.items[index].checkbox)
  4. end

API 6.9
lib:EnableSpecialKeyContextMenu(key)
key: KEY_CTRL or KEY_ALT or KEY_SHIFT or KEY_COMMAND
Show an alternative context menu, if the special key is pressed while right-clicking the inventory item.

lib:RegisterSpecialKeyContextMenu(func)
Register a callback for the alternative context menu. You, the addon author, have to check which menu items you want to add for the given combination of special keys. (See signature below)
You have to enable all the keys you want to handle. See lib:EnableSpecialKeyContextMenu(key). There is no DisableSpecialKeyContextMenu, because you don't know who else had enabled them.

Signature:
Lua Code:
  1. local function func(inventorySlot, slotActions, ctrl, alt, shift, command)
  2. end
API 6.92
lib:RegisterPlayerContextMenu(func, category)
Register to the context menu of the chat player link mouse right click,

func: callback function to be called.
Signature:
Code:
local function func(playerName, rawName)
end
Category: See API 6.2 description for the available categories.

API 7.1
lib:RegisterGuildRosterContextMenu(func, category)
Register to the context menu of the guild roster member mouse right click.

func: callback function to be called.
Signature:
Code:
local function func(rowData)
end
API 7.2
lib:RegisterFriendsListContextMenu(func, category)
Register to the context menu of the friends list mouse right click.

lib:RegisterGroupListContextMenu(func, category)
Register to the context menu of the group list mouse right click.

Both analog to RegisterGuildRosterContextMenu. See above.

Example
Lua Code:
  1. local function AddItem(data)
  2. AddCustomMenuItem("Example", function() d(data.displayName) end)
  3. end
  4.  
  5. local menu = LibCustomMenu
  6. menu:RegisterFriendsListContextMenu(AddItem, menu.CATEGORY_EARLY)
  7. menu:RegisterFriendsListContextMenu(AddItem, menu.CATEGORY_LAST)
version 7.2.1:
- Fixed nil error in AddCustomMenuItem. Sorry.

version 7.2.0:
- New functions RegisterFriendsListContextMenu and RegisterGroupListContextMenu as requested.

version 7.1.3:
- Update for "High Isle".

version 7.1.2:
- Fix for U32 adding a divider to header menu item. Thanks to @silvereyes.

version 7.1.1:
- Fixed issue with Shissu's Guild Tools. Thanks to @marcbf for reporting.

version 7.1.0:
- New API function RegisterGuildRosterContextMenu. Requested by @Saenic.

version 7.0.1:
- Allow to click sub-menu button itself. (a bit like a DropDown-Button)
- Allow to refresh/change other sub-menu items with clicking a checkbox menu item.

version 7.0.0:
- Removed LibStub support
- Added new menu item type: MENU_ADD_OPTION_HEADER

version 6.9.5:
- Update to API 100034 "Flames of Ambition".

version 6.9.4:
- Update to API 100033 "Markarth".

version 6.9.3:
- Update to API 100032 "Stonethorn".

version 6.9.2. Upon request added a new function RegisterPlayerContextMenu to added menu items to the player context menu of the chat.

version 6.9.1: Forgotten to increase the version number for LibStub legacy support. Added a warning, if LibStub has a "newer" version, which should not be!

version 6.9.0:
- Support keyboard modifier keys for inventory context menu to create special menus using those keys.

version 6.8.2:
- Update to API 100030 "Harrowstorm".

version 6.8.1:
- Update to API 100029 "Dragonhold".

version 6.8.0:
- Fix layout of built-in checkbox button of menu top level entries
- Added tooltip support: Either callback function or text string.

version 6.7.1:
- Update to API 100028 "Scalebreaker".

version 6.7.0:
- API bump 100027 "Elsweyr".
- Accessible via LibCustomMenu.
- Use of LibStub is optional.

version 6.6.3:
- Update to API 100026 "Wrathstone".

version 6.6.2:
- Reverted back to depend on LibStub. It is too early for that.

version 6.6.1:
- Update to API 100025 "Murkmire".
- Work without LibStub as well.

version 6.6:
- Update to API 100024 "Wolfhunter".
- New library load structure.

version 6.5: Fix for PTS.

version 6.4: Fixed compatibility with other addons hooking the context-menu. Like Craft Bag Extended.

version 6.3:
- Improve compabitility with AGS.

version 6.2:
- Handle inventory context menu and key strip menu. Take 2.


version 6.1:
- Fixed a conflict with CraftBagExtended.

version 6:
- Handle inventory context menu and key strip menu.


version 5:
- Supporting checkboxes in submenus.
- Fixed Divider menu item.

version 4.3:
- Update for "Horns of the Reach".

version 4.2.0:
- Fixed rare timing issue closing menu while mouse is over sub-menu.
- APIVersion update to 100017.

version 4.1.1:
- APIVersion update to 100014.

version 4.1:
- Added ZO_InventorySlotActions:AddCustomSlotAction. (Requested by merlight)
- APIVersion update to 100013.

version 4: * Working with Orsinium. Just the manifest APIVersion must be updated
- Fixed issue: main menu not closing if sub-menu used outside inventory. Thanks to circonian.

version 3:
- New menu item type: Divider. A static text "-" will be displayed as a divider. You can use <lib>.DIVIDER for better readability.

version 2:
- New global function AddCustomSubMenuItem

version 1:
- New global function AddCustomMenuItem as a replacement for AddMenuItem.
Optional Files (0)


Archived Files (35)
File Name
Version
Size
Uploader
Date
7.2.0
8kB
votan
03/11/23 11:59 AM
7.1.3
8kB
votan
04/24/22 09:04 AM
7.1.2
8kB
votan
10/24/21 07:44 AM
7.1.1
8kB
votan
09/05/21 07:30 AM
7.1.0
8kB
votan
09/04/21 09:32 AM
7.0.1
8kB
votan
07/04/21 04:46 AM
7.0.0
8kB
votan
04/28/21 11:21 AM
6.9.5
7kB
votan
02/20/21 09:09 AM
6.9.4
7kB
votan
11/02/20 04:41 AM
6.9.3
7kB
votan
08/22/20 04:55 AM
6.9.2
7kB
votan
04/21/20 03:12 PM
6.9.1
7kB
votan
04/04/20 06:22 AM
6.9.0
7kB
votan
04/03/20 11:43 AM
6.8.2
7kB
votan
02/15/20 11:44 AM
6.8.1
7kB
votan
10/03/19 04:37 AM
6.8.0
7kB
votan
08/07/19 01:15 PM
6.7.1
7kB
votan
07/30/19 11:57 AM
6.7.0
7kB
votan
05/18/19 08:07 AM
6.6.3
16kB
votan
02/23/19 10:15 AM
6.6.2
8kB
votan
10/21/18 09:31 AM
6.6.1
7kB
votan
10/19/18 12:13 PM
6.6
14kB
votan
08/13/18 11:17 AM
6.5
8kB
votan
04/22/18 05:21 AM
6.4
7kB
votan
04/16/18 11:45 AM
6.3
7kB
votan
03/03/18 10:58 AM
6.2
8kB
votan
02/02/18 12:35 AM
5
7kB
votan
01/27/18 03:11 PM
5
7kB
votan
08/15/17 12:34 PM
4.3
6kB
votan
07/15/17 01:00 PM
4.2.0
6kB
votan
10/12/16 12:56 PM
4.1.1
6kB
votan
03/07/16 12:13 PM
4.1.0
6kB
votan
11/22/15 02:24 PM
4.0.0
6kB
votan
08/06/15 10:48 AM
3.0.0
6kB
votan
07/25/15 05:36 AM
2.0.0
5kB
votan
07/11/15 10:51 AM


Post A Reply Comment Options
Unread 05/01/21, 12:47 AM  
Reflexwolf

Forum posts: 0
File comments: 4
Uploads: 0
fix not working

I tried this and sadly its not working for me, I get the error on all my alts when doing nightly writs.


Originally Posted by votan
Version 7.0.0 will break Dolgubon's Lazy Writ Crafter (up to 3.0.4), because the way it includes the library can no longer supported. Sorry.
You can change the DolgubonsLazyWritCreator.txt to include the library the supported way:
Code:
; This Add-on is not created by, affiliated with or sponsored by ZeniMax
; Media Inc. or its affiliates. The Elder Scrolls® and related logos are
; registered trademarks or trademarks of ZeniMax Media Inc. in the United
; States and/or other countries. All rights reserved.
; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms

## Title: Dolgubon's Lazy Writ Creator v3.0.4
## APIVersion: 100034 100033
## Author: Dolgubon
## Version: 3.0.4
## DependsOn: LibAddonMenu-2.0 LibLazyCrafting LibCustomMenu
## OptionalDependsOn: LibAddonMenu-2.0 pChat LibLazyCrafting LibStub LibFeedback 
## SavedVariables: DolgubonsWritCrafterSavedVars

libs\LibCustomTitles\LibCustomTitles.lua

libs\LibFeedback\feedback.lua

#libs\LibCustomMenu\LibCustomMenu.lua

HelperFunctions.lua
LootHandler.lua
QuestHandler.lua

WritCreater.xml
WritCreater.lua
MasterWrits.lua
BankWithdraw.lua

Languages/default.lua
Languages/$(language).lua
SettingsMenu.lua
SlashCommands.lua
Tutorial.lua
ReticleChanges.lua
Crafter.lua
ResetWarning.lua
StatsWindow.lua
bindings.xml
Report comment to moderator  
Reply With Quote
Unread 04/30/21, 05:40 PM  
rufusredbeard
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 50
Uploads: 1
I had to remove LibCustomMenu and LibStub from the libs (and .txt) of Item Set Browser as well to get things working.
Report comment to moderator  
Reply With Quote
Unread 04/30/21, 07:25 AM  
PucMudDofuss

Forum posts: 0
File comments: 7
Uploads: 0
That fixed it! Thank you very much
Report comment to moderator  
Reply With Quote
Unread 04/30/21, 03:06 AM  
FWSWBN
 
FWSWBN's Avatar

Forum posts: 18
File comments: 489
Uploads: 0
Re: Re: Re: Same as the rest

Originally Posted by Baertram
A maybe easier solution would also be to find the folder live/Addons/LazyWritCrafter and check the subfolder "libs". Delete the file LibCustomMenu.lua in there as this is the outdated version.
Without editing the txt file this will make the addon manager stop loading the outdated version and if you install the newest version of LibCustomMenu to live/AddOns directly it will be loaded from there properly.
This I try and it worked....
No Errors, no other lua messages.
I had many addons with the old LibCustomMenu.lua and delete them all.
Everything now is fine and works.

>>>>only for info, maybe others can make it like this way. its very easy and quick (i personaly use 200+ addons and it take arround 10 min to find all outdated libs and delete them. no edit on textfiles).<<<<

Thx Baertram for putting me on this way.
Report comment to moderator  
Reply With Quote
Unread 04/30/21, 02:01 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4990
File comments: 6042
Uploads: 78
Re: Re: Same as the rest

A maybe easier solution would also be to find the folder live/Addons/LazyWritCrafter and check the subfolder "libs". Delete the file LibCustomMenu.lua in there as this is the outdated version.
Without editing the txt file this will make the addon manager stop loading the outdated version and if you install the newest version of LibCustomMenu to live/AddOns directly it will be loaded from there properly.

At the "Help" menu above you'll find a howto manually install addons. There you'll find the info how to locate your live/AddOns folder. In the forum "Addon help" you can also read the sticky post about finding the addon folder, with more ways to locate the folder (e.g. Taking a Screenshot ingame and watch the filename shown at the top right screen edge. The folder above "Screenshots" is your live folder, so just open it with a file explorer and navigate to the subfolder "AddOns" .

For the ones charging the txt files with an editor: please always logout before doing this, else it might not work.
Either add the # at the beginning of the line where /livs/LibCustomMenu.lua is called, or completely delete this line so the file won't be called anymore. But at best just copy & paste the whole contents Votan provided. Should be the easiest thing.

Originally Posted by Sylvermoon
Originally Posted by minigamer
So I tried the fix in the txt for lazy crafting and it didn't work. Any suggestions?
The best thing to do is to copy the whole file (in the code window) then open the relevant file, CTRL A to select all, then CTRL V to paste the info from the code window, then save. That way you won't miss something.

And thanks much @Votan!
Last edited by Baertram : 04/30/21 at 02:05 AM.
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 07:00 PM  
Sylvermoon

Forum posts: 5
File comments: 33
Uploads: 0
Re: Same as the rest

Originally Posted by minigamer
So I tried the fix in the txt for lazy crafting and it didn't work. Any suggestions?
The best thing to do is to copy the whole file (in the code window) then open the relevant file, CTRL A to select all, then CTRL V to paste the info from the code window, then save. That way you won't miss something.

And thanks much @Votan!
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 06:07 PM  
minigamer

Forum posts: 1
File comments: 3
Uploads: 0
Same as the rest

So I tried the fix in the txt for lazy crafting and it didn't work. Any suggestions?
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 03:47 PM  
Torvar
 
Torvar's Avatar

Forum posts: 0
File comments: 3
Uploads: 0
Originally Posted by nk125x
Its also broke Ult guild store and auto catagorize for bank and bag
Yep it sure did.
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 03:06 PM  
nk125x

Forum posts: 5
File comments: 52
Uploads: 0
Its also broke Ult guild store and auto catagorize for bank and bag
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 02:06 PM  
zamborlini

Forum posts: 0
File comments: 1
Uploads: 0
This works!

Thank you for this! For those of us who are less savvy on fixing this kind of stuff and will ask, "well how do i do that?" (like I did on google), quick solution is to search your computer files where you save your edits (likely My Documents on PC) for the DolgubonsLazyWritCreator.txt file then make the changes!

Originally Posted by Baertram

Please read and follow if you get any Double control error message with e. G. SetTracker or Dolgubon Lazy Writ Crafter


Originally Posted by votan
Version 7.0.0 will break Dolgubon's Lazy Writ Crafter (up to 3.0.4), because the way it includes the library can no longer supported. Sorry.
You can change the DolgubonsLazyWritCreator.txt to include the library the supported way:
Code:
; This Add-on is not created by, affiliated with or sponsored by ZeniMax
; Media Inc. or its affiliates. The Elder Scrolls® and related logos are
; registered trademarks or trademarks of ZeniMax Media Inc. in the United
; States and/or other countries. All rights reserved.
; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms

## Title: Dolgubon's Lazy Writ Creator v3.0.4
## APIVersion: 100034 100033
## Author: Dolgubon
## Version: 3.0.4
## DependsOn: LibAddonMenu-2.0 LibLazyCrafting LibCustomMenu
## OptionalDependsOn: LibAddonMenu-2.0 pChat LibLazyCrafting LibStub LibFeedback 
## SavedVariables: DolgubonsWritCrafterSavedVars

libs\LibCustomTitles\LibCustomTitles.lua

libs\LibFeedback\feedback.lua

#libs\LibCustomMenu\LibCustomMenu.lua

HelperFunctions.lua
LootHandler.lua
QuestHandler.lua

WritCreater.xml
WritCreater.lua
MasterWrits.lua
BankWithdraw.lua

Languages/default.lua
Languages/$(language).lua
SettingsMenu.lua
SlashCommands.lua
Tutorial.lua
ReticleChanges.lua
Crafter.lua
ResetWarning.lua
StatsWindow.lua
bindings.xml

Originally Posted by Schrappe
Restoring the latest version libCostumMenu 6.9.5 is the easiest solution.
No it isn't! This will break other addons or make them not functional anymore. Your solution is to use old versions instead of forcing the wrong addons to use the correct way to implement dependencies. If they would do the newest version would be always automatically be used and you guys wouldn't notice any errors.

You should learn how dependencies work (check the addon help forum for the sticky post e. G. https://www.esoui.com/forums/showthread.php?t=9149 ) and votan already told you guys what to do if addons like LazyWritCrafter include libraries the wrong way (hard-coded in the txt file of that addon).

Please tell the addon devs of the other addons to fix this (we did already weeks ago...) and for the meantime just delete the lines to LibCustomMenu in the other addon's txt file, e. G. LazyWritCrafter.txt or SetTracker.txt

Btw SetTracker is outdated and should not be used any longer (since 2020) as it's code throws error because of old libraries and code.
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 01:21 PM  
ajaxcat1

Forum posts: 0
File comments: 37
Uploads: 0
Originally Posted by jacozilla
If we make this text change to fix working with Dolgubon Lazy Writ Crafter, what about the bug re: unable to list items on broker?

What text file do we need to modify to fix that? e.g. I am using Awesome Guild Store and Advanced Filters, with 6.9.5 all is fine, with latest custom 7.0 the ability to list items is broken.

Is this bug fixed by modifying the Dolgubon text file as advised here, or are there other files needing manual editing for broker addons?
After I made the change to writ crafter I was able to list in the store as well. I use awesome guild store and MM but not advanced filters so I can't speak to that and ofc this is how it worked on my pc, no sure about others.
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 01:15 PM  
rumple9

Forum posts: 3
File comments: 86
Uploads: 0
please roll back ver 7 or fix it. Thank you
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 01:03 PM  
Elledar

Forum posts: 0
File comments: 12
Uploads: 0
ver.7.0.0 breaks AwesomeGuildStore!!!
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 12:30 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4990
File comments: 6042
Uploads: 78
Originally Posted by ckr
Originally Posted by Schrappe
It is not correct action if you now refer to the user files themselves and to notify add-on authors which errors they cause.
Correct is if the author of an add-on update makes sure that all previous current add-ons work correctly
Yes, it's called regression testing. This is why these libraries are, and always have been, a bad idea.
No they are a great idea IF all authors would be using them correctly. They ARE backwards compatible and work fine with all others IF the authors would implement them the correct way, and not like 2014! Or why do you think it works fine for 99% of the addons and only 1 very outdated and one where the author has not changed the way libs are called (still included, still hardcoded) are the only ones that interfer here?

As I said: READ the info about how dependencies work and then you can start to blame the ones that do the job wrong, instead of blaming the ones keeping the code up2date. It's not possible to make something backwards compatible if the few guys still add the dependencies hardcoded like 2014, with all downsides.

Truth:
1. LibStub is dead so using it in your addons for > 1 year is a bad idea, but it is still used especially in the named one that Votan explained how to change properly
2. Hardcoding library calls in your addon's txt file is wrong, IF the libs should be included with their own txt file, so that the ingame vanila addon manager will find the newst version automatically. LibCustomMenu was designed that way since Summerset, and again this addon was not changed to apply to these rules, even though several devs told to do so please.

Both points were not adopted and are causing these errors now. The error message tells you the addon in charge so maybe better write there to fix it instead of writing here and spreading false information, please!

Blaming libraries for the wrong decision of a few ones, which create bugs for a lot (even bader that the addon in charge here is used by a lot of players) of us, is not the correct answer. It's just "the easiest one" that you can find and that's the reason you spread this false information imo.
Last edited by Baertram : 04/29/21 at 12:42 PM.
Report comment to moderator  
Reply With Quote
Unread 04/29/21, 10:17 AM  
ClevaTreva

Forum posts: 0
File comments: 40
Uploads: 0
Originally Posted by jacozilla
If we make this text change to fix working with Dolgubon Lazy Writ Crafter, what about the bug re: unable to list items on broker?

What text file do we need to modify to fix that? e.g. I am using Awesome Guild Store and Advanced Filters, with 6.9.5 all is fine, with latest custom 7.0 the ability to list items is broken.

Is this bug fixed by modifying the Dolgubon text file as advised here, or are there other files needing manual editing for broker addons?
I made this edit and it fixed the pop-up errors and enabled guild trading once more. I didn't notice any errors with LazyWritCrafter but it appears this fix works.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: