ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   'ZO_SortHeader_OnMouseEnter' error (https://www.esoui.com/forums/showthread.php?t=2312)

Argusus 10/06/14 10:22 PM

'ZO_SortHeader_OnMouseEnter' error
 
Hello,

i'm getting the message below. i'm trying to mimic the ScrollListExample. my data is displaying but the sort doesn't work. is there any simple things to double check for this error?

Code:

EsoUI/Libraries/ZO_SortHeaderGroup/ZO_SortHeaderGroup.lua:264: attempt to index a nil value
stack traceback:
        EsoUI/Libraries/ZO_SortHeaderGroup/ZO_SortHeaderGroup.lua:264: in function 'ZO_SortHeader_OnMouseEnter'
        11557962843809674184:3: in function '(main chunk)'


Garkin 10/07/14 08:45 AM

Quote:

Originally Posted by skobyjay (Post 12523)
Hello,

i'm getting the message below. i'm trying to mimic the ScrollListExample. my data is displaying but the sort doesn't work. is there any simple things to double check for this error?

Code:

EsoUI/Libraries/ZO_SortHeaderGroup/ZO_SortHeaderGroup.lua:264: attempt to index a nil value
stack traceback:
        EsoUI/Libraries/ZO_SortHeaderGroup/ZO_SortHeaderGroup.lua:264: in function 'ZO_SortHeader_OnMouseEnter'
        11557962843809674184:3: in function '(main chunk)'


Original code of Scroll List Example works, so what chages did you do?

ZO_SortHeader_OnMouseEnter(control) function expects that control exists and control must have ZO_SortHeaderGroup object in the control.sortHeaderGroup key. Basically if header is properly initialized it works.

Argusus 10/07/14 09:18 AM

I will look at my initialization again this evening. I'm basically showing the same information as your example. Only I added a few new fields like veteran rank and location to the list. I started with a new file so I probably have mistyped something along the way.

Argusus 10/07/14 08:29 PM

1 Attachment(s)
Quote:

Originally Posted by Garkin (Post 12528)
Original code of Scroll List Example works, so what chages did you do?

ZO_SortHeader_OnMouseEnter(control) function expects that control exists and control must have ZO_SortHeaderGroup object in the control.sortHeaderGroup key. Basically if header is properly initialized it works.

my list is on the right and the scrolllistexample is on the left, it looks like i'm not getting the "dataEntry" object automatically added to my data objects...

Garkin 10/07/14 08:59 PM

Quote:

Originally Posted by skobyjay (Post 12544)
my list is on the right and the scrolllistexample is on the left, it looks like i'm not getting the "dataEntry" object automatically added to my data objects...

Key "dataEntry" is created by ZO_ScrollList_CreateDataEntry(typeId, data, categoryId).
This function is called in the UnitList:FilterScrollList(). By the way even if you don't see in the code where FilterScollList() method is used, it is still necessary. It is called every time when you refresh data using the UnitList:Refresh() - from the ZO_SortFilterList:RefreshData().

Argusus 10/07/14 09:27 PM

Quote:

Originally Posted by Garkin (Post 12545)
Key "dataEntry" is created by ZO_ScrollList_CreateDataEntry(typeId, data, categoryId).
This function is called in the UnitList:FilterScrollList(). By the way even if you don't see in the code where FilterScollList() method is used, it is still necessary. It is called every time when you refresh data using the UnitList:Refresh() - from the ZO_SortFilterList:RefreshData().

okay. i have that code in place. maybe its related to the "CustomerList" I have being "global" unlike UnitList.

Argusus 10/07/14 09:32 PM

Quote:

Originally Posted by Garkin (Post 12545)
Key "dataEntry" is created by ZO_ScrollList_CreateDataEntry(typeId, data, categoryId).
This function is called in the UnitList:FilterScrollList(). By the way even if you don't see in the code where FilterScollList() method is used, it is still necessary. It is called every time when you refresh data using the UnitList:Refresh() - from the ZO_SortFilterList:RefreshData().

i'm also noticing my "FilterScrollList" event isn't firing as well. i'm not able to output debug messages from those events. (unlike I can in ScrollListexample)

Argusus 10/08/14 07:50 AM

I ended up just starting from scratch and everything works now. I wasn't able to do a file difference comparison. But it works now!


All times are GMT -6. The time now is 05:22 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI