Thread Tools Display Modes
04/28/14, 04:13 AM   #1
DerVagabund
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
Too many Anchors processed - how to avoid this?

Hello,

since my latest update it seems that my addon in combination with others, which have a lot of GUI components, my cause this error.

Originally Posted by Mitosuke
I've just found and installed your wonderful add-on and I am also getting the same "Too many Anchors processed" error that some others are experiencing. I played around with enabling and disabling certain combos of add-ons to try and find some sort of incompatibility. It looks to me like an 'achor' limit/cap that the game allows? The error disappears when I disabled Wykkyd's Framework, (I tested with this because I believe it uses a fair amount of anchors). As soon as I re-enabled it, the error was back. If I disable several other anchor using add-ons I can get the error to disappear too. I currently have 13 add-ons installed, not counting this one.
As you can see, in this example if he uses Wykkyd's Framework and my addon this error occurs.

The problem is, in my latest version I added 200 checkboxes in order to allow a very detailed level of ingredients filtering. I thought about how to avoid this, but aside from using a pure textual representation I could thought of no way to avoid having at least each element as a GUI element, thus I need at least 1 Anchor for each item.

Does anyone have any idea how I can efficiently present a list of items and not use Anchors for each item?

If this is not possible, I really need to scrap my new user interface and revert back to textual representation.

Btw., at the moment I implemented these 200 Checkboxes with the LibAddonMenu - could this be the source of the problem? Or do we just reach a global maximum number of handlers allowed for all addons combined? Does anyone have some thoughts on this?

Thanks for your help,
best regards,
DV
  Reply With Quote
04/28/14, 09:28 AM   #2
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 76
Any chance they can be put in categories, say maybe 50 per category.
Display those and add a button that calls a script function to 'rewrite' the content/functions
of the displayed data with other data.

It will be a lot of code though.
  Reply With Quote
04/28/14, 10:17 AM   #3
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
You could also use a TextBufferControl, AddMessage() the filter options colored depending on if they are enabled or disabled and check via OnMouseDown() the coordinates to calculate which line was clicked to change the state. GetDimensions() the control and divide by entries, then you have nearly the height per line, there might be a little correction value necessary.
  Reply With Quote
04/28/14, 12:13 PM   #4
DerVagabund
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
Hello,

thanks for the ideas - I also thought about some textual display, but as you mentioned, in order to realize that I would need to calculate each items position individually.

To have a paged view on the other hand could be a solution whereas a scrollable list has more the feel of giving a better overview.

But one of these approaches it will be I fear.

Does anyone know the limit of anchors? Or is there any function to determine them, without recursively iterate through each controls and its children just to count them (if this is possible at all)?
  Reply With Quote
04/28/14, 02:31 PM   #5
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by DerVagabund View Post
thanks for the ideas - I also thought about some textual display, but as you mentioned, in order to realize that I would need to calculate each items position individually.
That's a two-liner; if you like it excessive.

lineHeight = ControlHeight / maxLines
lineIndex = math.floor(CursorYPos / lineHeight) + 1
  Reply With Quote
04/28/14, 02:53 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
You just have way too many controls for the type of options display that LAM provides period. Error or no error. Also, that many checkbox options is not only a nightmare for you to maintain, but also for your users to navigate and use. LAM isn't the best options display for every addon, depending on what you want to do. If you really, really want to present your options in this way, this is one of those cases where you shouldn't be adding all those things to a panel with LAM.

You should have some sort of list that users can add/remove items to instead of having to traverse some 200 settings. Besides, what if they want to mark something as junk that you don't have in the list? What about when new items are added to the game?

If you want to keep the preconfigured items list, and still use LAM, then set up your lists in separate panels that open when a user clicks a button that you add via LAM. This might avoid the error.


Lastly, this error does seem to be a limitation of the client, though more testing is needed to confirm this and to find what the limit may be.
  Reply With Quote
04/28/14, 04:02 PM   #7
DerVagabund
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
Hello Seerah,

thanks for your reply - yes, it is excessive to have such a big list in the settings - thus I started to create my own user interface to handle this. But you're right, I also thought about a list where a user can add item he wants to keep. Then I could start with a dropdown list and let him choose which one he wants to add - there is just another question that comes to my mind - what's the limit of entries in a dropdown list?

As for new items, this is the next step I'll implement. I will provide a basic list, but also the option to track all newly found items not currently in it and add the new item automatically for the user to select what he wants to do with it. Thus I do not need to provide a full list up front - actually when this is done, I could start with no list at all and let the user gather it step by step while playing.

Thanks for your help,
best regards,
DV
  Reply With Quote
04/29/14, 10:32 AM   #8
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Post

Or you create something like this:

  Reply With Quote
04/29/14, 11:41 AM   #9
BL!NK
Join Date: Mar 2014
Posts: 7
couldn't you just put an option in the right click context menu in the inventory like ... "Never pick this up"

?
  Reply With Quote
04/30/14, 04:47 AM   #10
DerVagabund
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
Hello, thanks for the suggestions.

@Iyanga: sure, something like this will work, but the problem is each item displayed in the two list boxes will also have at least one anchor, so not that much difference. But I have to admit, it would also look good that way, maybe I change the Layout to this one as I do really like it

@Bl!nk: sure, I already have a beta right click function to create rules based on the clicked item, but the problem here is, you can not specify up front which ingredients you want to keep and which not - thus I initially implemented the list. But you're right - this would work as well. Maybe I should make a poll how it should be displayed and how the ingredients shall be selected.
  Reply With Quote
04/30/14, 11:12 AM   #11
Wykkyd
Are you Wykkyd Gaming?
 
Wykkyd's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 107
I also found a way to hack sub-menus into LAM, fyi.
  • I create my main Settings Menu using LAM
  • I then call for sub-menu items to be creating using an appended PanelID from that parent, so for example: PanelID+0.1001
  • For each item created I also list the return from LAM in a local table; we'll call it: SubMenuCollection[ PanelID+0.1001]
  • Then I add a Button to my parent menu and I set the callback to something like: <detect if the settings menu collection contains PanelID+0.1001 and insert it. On first pass it won't yet include the collection>; ZO_SettingsMenu_ChangePanel( PanelID:0.1001 );
  • And then I make sure that my submenu ends with a button that changes panel back to the parent

My new implementation of Framework is converting to LibWykkydFactory and includes this functionality by default. My addons will be using this extensively to split their sub-configurations into child panels, so that the primary settings panel isn't flooded with tons of entries and I don't end up with hundreds of config options all in one massive screen.
  Reply With Quote
04/30/14, 02:57 PM   #12
DerVagabund
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
That sounds quite interesting! I will definitely have a look at this. As of now I've just created my own panel with a scroll list and imitate a scrollable multicolumn table
  Reply With Quote
04/30/14, 07:08 PM   #13
Divona
 
Divona's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 12
Originally Posted by Wykkyd View Post
I also found a way to hack sub-menus into LAM, fyi.
  • I create my main Settings Menu using LAM
  • I then call for sub-menu items to be creating using an appended PanelID from that parent, so for example: PanelID+0.1001
  • For each item created I also list the return from LAM in a local table; we'll call it: SubMenuCollection[ PanelID+0.1001]
  • Then I add a Button to my parent menu and I set the callback to something like: <detect if the settings menu collection contains PanelID+0.1001 and insert it. On first pass it won't yet include the collection>; ZO_SettingsMenu_ChangePanel( PanelID:0.1001 );
  • And then I make sure that my submenu ends with a button that changes panel back to the parent

My new implementation of Framework is converting to LibWykkydFactory and includes this functionality by default. My addons will be using this extensively to split their sub-configurations into child panels, so that the primary settings panel isn't flooded with tons of entries and I don't end up with hundreds of config options all in one massive screen.
Would this help with "too many anchor processed" error? It sound like it should as it does not create all options at once.
  Reply With Quote
04/30/14, 10:10 PM   #14
Wykkyd
Are you Wykkyd Gaming?
 
Wykkyd's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 107
Originally Posted by Divona View Post
Would this help with "too many anchor processed" error? It sound like it should as it does not create all options at once.
Since it doesn't process the anchors until the panel is displayed, yes it should help. You can have 4 billion objects anchored in a settings panel so long as you never show it. Once you do, nuclear essplosions of Lua splatter your screen.

It's also much, much cleaner. I'll be migrating things over to it over the coming weeks. It's actually quite... "hot", if I can use that phrase
  Reply With Quote
05/02/14, 01:23 PM   #15
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
If this is the case, then the rewrite of LibAddonMenu I am planning for the summer should avoid the error as well.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Too many Anchors processed - how to avoid this?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off