Ps. this code is using GoTK3 (https://github.com/gotk3/gotk3), but I think the question is not connected to GoTK3 since it works fine in the second case. Can you not use the one-liner code when you have a type m which has a pointer to another type FundList? That seems random…
Syntactically, there’s no reason it shouldn’t work. Are you checking the error value after the call to Connect? Are m and m.FundList non-nil at the time you click?
That is good to know, and I have never had a problem with this before, so I did not expect any problem here…but there was…
Yes, and there are no errors…
They should be, m is a pointer to the main form, and that form is still open when the button is clicked, and m.FundList is a pointer that is only cleared when I shut down the main form (in the shutdown() function).
Anyway, I think your answer, that it should work, is good enough for me right now. Either something weird is happening in GoTK3, or more likely, I have made some stupid mistake in the code somewhere that I might (or might not) find in the future. The important thing is that I have a workaround for now (the three liner).
The reason I asked the question, was that I was afraid that I had missed some point about receivers and pointers, that I probably should have known about