Basalt
Basalt copied to clipboard
docs: [Treeveiw Example not working]
** Where? **
In the example in the "Treeview" section I got a error.
** Possible solution **
I tried to use the example on the "onSelect" event it worked until clicked on the "Child Node" but it showed this error.
** My Code**
Code I used for example 1
Code I used for example 2
** What I found out **
From me testing it seems like that this was the problem:
childNode.onSelect(function(self)
basalt.debug("Node selected:", self.getText())
end)
The self.getText() was making the error come it says that
attempt to call method 'getText' (a nil value)
** Checklist **
- [X] I am looking at the latest version of the docs.
- [x] I am using CraftOS 1.8 because i am using CC: Restitched (https://www.curseforge.com/minecraft/mc-mods/cc-restitched).