cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.32k stars 71 forks source link

panic("reflect: slice index out of range") #888

Closed ddkwork closed 4 months ago

kkoreilly commented 4 months ago

I figured out the cause of that problem, and that is not the best solution. I will work on implementing my fix.

kkoreilly commented 4 months ago

I fixed this problem in 0d52caf18e4f15b0e1b54bc90cf6923a9aec1963.

ddkwork commented 4 months ago

I fixed this problem in 0d52caf18e4f15b0e1b54bc90cf6923a9aec1963.

At that time, I triggered this panic operation instead of double-clicking, but like this: fill the table with an empty struct, run the main function, right-click on the table layout, click edit, each row is empty, but we can come to the window where the struct is displayed, this process causes the index to be 0 because of the empty table, and the reflection is out of bounds

kkoreilly commented 4 months ago

I fixed the other part of this issue that you mentioned. Now it both selects the correct row and is robust to right clicks out of bounds.

ddkwork commented 4 months ago

thanks

---Original--- From: @.> Date: Sun, Feb 18, 2024 14:47 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [cogentcore/core] panic("reflect: slice index out of range") (PR#888)

I fixed the other part of this issue that you mentioned. Now it both selects the correct row and is robust to right clicks out of bounds.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>