Thread Tools Display Modes
10/06/14, 10:22 PM   #1
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
'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)'
  Reply With Quote
10/07/14, 08:45 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by skobyjay View Post
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.
  Reply With Quote
10/07/14, 09:18 AM   #3
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
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.
  Reply With Quote
10/07/14, 08:29 PM   #4
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Originally Posted by Garkin View Post
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...
Attached Thumbnails
Click image for larger version

Name:	example.png
Views:	418
Size:	275.4 KB
ID:	487  
  Reply With Quote
10/07/14, 08:59 PM   #5
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by skobyjay View Post
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().
  Reply With Quote
10/07/14, 09:27 PM   #6
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Originally Posted by Garkin View Post
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.
  Reply With Quote
10/07/14, 09:32 PM   #7
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Originally Posted by Garkin View Post
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)
  Reply With Quote
10/08/14, 07:50 AM   #8
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
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!
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » 'ZO_SortHeader_OnMouseEnter' error


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