Basalt icon indicating copy to clipboard operation
Basalt copied to clipboard

docs: [Treeveiw Example not working]

Open JV-lab-create opened this issue 1 year ago • 0 comments

** Where? **

In the example in the "Treeview" section I got a error. image

** 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. image

** My Code**

Code I used for example 1 image

Code I used for example 2

image

** 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).

JV-lab-create avatar Jan 01 '25 04:01 JV-lab-create