-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self is null in notify signal #218
Comments
Thanks for reporting. Notify signal support was indeed added very late, maybe two years ago, and I think it was working still one year ago. But maybe our latest fixes broke it, I will check soon. |
We have an example for the use of notify signal with GtkDropDown in the Nim GTK4 book, and that works fine for me, see https://ssalewski.de/gtkprogramming.html#_listview_columnview_gridview_and_dropdown, DropDown1.nim. GtkDropDown is closely related to GtkListView. So I assume that you are doing something wrong. For other ListView variants, use of notify::selected may be not that simple, due to the involved bind and setup procs. For further investigations, you may send a minimal working C example, or a minimal Nim example from which you thinks that it may work. |
Actually my guess is, that item.connect("notify::selected", makeEditableOnSelect, label) is wrong. I guess connecting to notify::selected should not be done to items, but for the container like a ListView. |
Strange bug that I encountered when connecting to the notify signal. Self is null and thus gives a runtime error when trying to access properties.
Throws runtime error:
I checked with a debugger and a null check. It is null in all cases, without exception
The text was updated successfully, but these errors were encountered: