go-gtk
go-gtk copied to clipboard
glib.IdleAdd crashed with panic: reflect: Call using reflect.Value as type string
please provide minimal code to reproduce.
I just figured out. If I define a function like:
func (btn* MyButton) SetLabel(label string) { ... } Then call it as: glib.IdleAdd(btn.SetLabel, "new label")
It will crash.
Then I changed the function to: func (btn* MyButton) SetLabel(data reflect.Value) { str := data.String() ... }
Then it works.
On Sun, Oct 11, 2020 at 11:48 AM mattn [email protected] wrote:
please provide minimal code to reproduce.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mattn/go-gtk/issues/417#issuecomment-706724566, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN7NRIJIAX4S73OXHXDYGDSKHHTXANCNFSM4SL25P7Q .