I'm wondering if anyone can tell me whats going on with this. I can't figure it out.
The code is sloppy, I was just trying to get it all to work...but the problems I'm having don't seem like they are coming from my code.
If you need to look at it though, its a bit, so I pasted it on pastebin, but I think the pictures below pretty much explain the problem.
PasteBin LUA code
PastBin XML Code
I put together a bunch of pictures, which might make more sense than me going into great detail.
The short of it is I'm trying to create/use a ZO_ScrollList, I'm giving items/controlData categoryIds when I add them to the scroll list, & then
my problem is with these two lines of code:
Lua Code:
ZO_ScrollList_HideAllCategories(TweakItScrollList)
ZO_ScrollList_ShowCategory(TweakItScrollList, currentId)
I'm running into problems when the scroll list is empty, or if it only contains 1 item in it.
Problem 1:
ZO_ScrollList_HideAllCategories(TweakItScrollList) doesn't work properly if there is only 1 activeControl. Notice theres still an image of the control, but its no longer there.
I would have assumed it was a mistake in my code somewhere, but the only time it doesn't work is if there is only 1 active control. It always works if there are several active controls:
Problem 2:
If I hide all categories and then show a category with only 1 active control in it AT THE SAME TIME...it works.
Compare the above picture with the one below...I don't get how the one above can work, but the one below does not work.
If I start with items/categories already in the list and do both of these at the same time it works.
I'm running them in ZAM Notebook.
Lua Code:
ZO_ScrollList_HideAllCategories(TweakItScrollList)
ZO_ScrollList_ShowCategory(TweakItScrollList, 3)
It hides all of the categories/items.
So at some point the list is empty, but it still works (it should)...
However If I start with an empty list. If I only run the code:
Lua Code:
ZO_ScrollList_HideAllCategories(TweakItScrollList)
and wait until after its finished and the window is empty, I have an empty list...and then I try to run:
Lua Code:
ZO_ScrollList_ShowCategory(TweakItScrollList, 3)
It does not work properly. The control gets added & its actually there, you can click on it, you just can't see it.
But then again...If you start with an empty list & add a category that has more than one item/control...It works just fine.
Any Ideas??