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

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


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