wxDataViewListCtrl on click item action not executing.
Re: wxDataViewListCtrl on click item action not executing.
I'm pretty much out of ideas, but i still think it's something simple
Does the "dataview" sample work for you?
It shouldn't make any difference, but can you try with a static event table instead of the Bind() call?
If you can use a debugger, try tracing into the Bind() call and check if something unexpected shows up.
You could also set a breakpoint at "wxdataview_selection_changed_callback" in /src/gtk/dataview.cpp and check if the code reaches that point.
Does the "dataview" sample work for you?
It shouldn't make any difference, but can you try with a static event table instead of the Bind() call?
If you can use a debugger, try tracing into the Bind() call and check if something unexpected shows up.
You could also set a breakpoint at "wxdataview_selection_changed_callback" in /src/gtk/dataview.cpp and check if the code reaches that point.
Use the source, Luke!
Re: wxDataViewListCtrl on click item action not executing.
I just checked the dataview sample, for some reason out of the 4 tabs, only the first tab, that is MyMusicTreeModel is firing events in the bottom section, in the wxDataViewListCtrl tab I'm not even able to toggle the check box. This is strange, If I remember correctly this sample worked before, can't guarantee but, could be wrong.Does the "dataview" sample work for you?
I tried nothing shows up, I'm out of ideas too at this point, I'm going to try to build and run this on a different machine, maybe something is broken in this machine.It shouldn't make any difference, but can you try with a static event table instead of the Bind() call?
If you can use a debugger, try tracing into the Bind() call and check if something unexpected shows up.
You could also set a breakpoint at "wxdataview_selection_changed_callback" in /src/gtk/dataview.cpp and check if the code reaches that point.
EDIT: Just checked on a different machine does not work. I think its a bug then.
Re: wxDataViewListCtrl on click item action not executing.
Hi,
What OS and GTK version do you use?
Did you build the library yourself or installed it from the repo?
Thank you.
What OS and GTK version do you use?
Did you build the library yourself or installed it from the repo?
Thank you.
Re: wxDataViewListCtrl on click item action not executing.
I am using Arch Linux, I am not really sure, how to know the GTK version, but I have download wxWidgets from the official repositories, package name was wxgtk3 which is on version 3.0.5, but if I run `pacman -Qi gtk3` I get
Code: Select all
Name : gtk3
Version : 1:3.24.24-2
Description : GObject-based multi-platform GUI toolkit
Architecture : x86_64
URL : https://www.gtk.org/
Licenses : LGPL
Groups : None
Provides : gtk3-print-backends libgtk-3.so=0-64 libgdk-3.so=0-64 libgailutil-3.so=0-64
Depends On : atk cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2 dconf libxcomposite libxdamage pango shared-mime-info at-spi2-atk wayland
libxkbcommon adwaita-icon-theme json-glib librsvg wayland-protocols desktop-file-utils mesa cantarell-fonts colord rest libcups libcanberra fribidi iso-codes
tracker3 libcloudproviders gtk-update-icon-cache
Optional Deps : None
Required By : appstream-glib arandr audacity blueman easytag electron electron6 emacs firefox gcr gdl geany girara glade gnome-desktop gtkmm3 gtksourceview3 gtkspell3
gufw guitarix guvcview libdbusmenu-gtk3 libgnomekbd libindicator-gtk3 libkeybinder3 libnautilus-extension libnma libxfce4ui light-locker lightdm-slick-greeter
lutris manjaro-application-utility manjaro-hello matcha-gtk-theme materia-gtk-theme obconf pamac-gtk peek polkit-gnome syncthing-gtk telegram-desktop
thunderbird timeshift variety volumeicon vscodium-bin vte3 webkit2gtk wxgtk3 xarchiver xfburn xournalpp
Optional For : alsa-tools appmenu-gtk-module avahi deadbeef freeverb3 ghostscript gssdp gvfs jre-openjdk libinput libreoffice-fresh nvidia-455xx-utils pacman-mirrors
qt5-base redshift stoken suil vlc wine-staging zbar
Conflicts With : gtk3-print-backends
Replaces : gtk3-print-backends<=3.22.26-1
Installed Size : 74.60 MiB
Packager : Jan Alexander Steffens (heftig) <[email protected]>
Build Date : Sun 10 Jan 2021 12:44:20 AM IST
Install Date : Mon 11 Jan 2021 03:15:03 AM IST
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
Re: wxDataViewListCtrl on click item action not executing.
Hi,
what you do is run the sample and then "Ctrl+Alt+Middle click".
This will give tou the info.
Thank you.
what you do is run the sample and then "Ctrl+Alt+Middle click".
This will give tou the info.
Thank you.
Re: wxDataViewListCtrl on click item action not executing.
I usually don't work under Linux, but i have one VM for occasional testing.
The dataview sample doesn't have log output for item selections on the third page (wxDataViewListCtrl) by default. But i confirmed that they do get generated with a small patch to the sample.
(Around line 930)
But that was with a relatively new wxWidgets version from GIT. Can you test with that or at least with version 3.1.4?
The dataview sample doesn't have log output for item selections on the third page (wxDataViewListCtrl) by default. But i confirmed that they do get generated with a small patch to the sample.
(Around line 930)
Code: Select all
lc->Bind(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, &MyFrame::OnListValueChanged, this);
// new line below
lc->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this, lc](wxDataViewEvent &e) {
wxLogDebug("dataviewevent row %d", lc->ItemToRow(e.GetItem()));
});
Use the source, Luke!
Re: wxDataViewListCtrl on click item action not executing.
I just fired up a Ubuntu VM, cloned my repository, and tried the same thing, its not working in Ubuntu as well :/doublemax wrote: ↑Wed Jan 13, 2021 6:04 pm I usually don't work under Linux, but i have one VM for occasional testing.
The dataview sample doesn't have log output for item selections on the third page (wxDataViewListCtrl) by default. But i confirmed that they do get generated with a small patch to the sample.
(Around line 930)But that was with a relatively new wxWidgets version from GIT. Can you test with that or at least with version 3.1.4?Code: Select all
lc->Bind(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, &MyFrame::OnListValueChanged, this); // new line below lc->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this, lc](wxDataViewEvent &e) { wxLogDebug("dataviewevent row %d", lc->ItemToRow(e.GetItem())); });
Screenshot from 2021-01-13 18-48-19.png
Here is the GTK info,
EDIT: I tested with wx 3.1.4, with the added code you sent, it prints to the console fine.
Re: wxDataViewListCtrl on click item action not executing.
I guess this means it was/is a bug in 3.0.5. I can't find any ticket on the bug tracker about this, but then again, its search function is horrible...
Use the source, Luke!
Re: wxDataViewListCtrl on click item action not executing.
Re: wxDataViewListCtrl on click item action not executing.
You could try, but i doubt the 3.0.x path will be fixed. Can't you use a 3.1.x version?
Use the source, Luke!
Re: wxDataViewListCtrl on click item action not executing.
Re: wxDataViewListCtrl on click item action not executing.
Hi,
You don't have to install it.
You can just download it, build it it, and then use its wx-config for building you software. And also build and run the sample.
To build:
1. Download and unpack in for example ~/wxWidgets-3.1.4
2. cd ~/wxWidgets-3.1.4
3. mkdir buildGTK
4. cd buildGTK
5. ../configure --enable-debug --with-gtk=3 && make
Then use ~/wxWidgets-3.1.4/buildGTK/wx-config --cxxflags and ~/wxWidgets-3.1.4/buildGTK/wx-config --libs for building your software.
Thank you.
And you are certainly encouraged to use latest release version. It may not be marked as stable by *nix distributions, but it eventually will when it becomes 3.2.0 (hopefully in the next couple of month).
You don't have to install it.
You can just download it, build it it, and then use its wx-config for building you software. And also build and run the sample.
To build:
1. Download and unpack in for example ~/wxWidgets-3.1.4
2. cd ~/wxWidgets-3.1.4
3. mkdir buildGTK
4. cd buildGTK
5. ../configure --enable-debug --with-gtk=3 && make
Then use ~/wxWidgets-3.1.4/buildGTK/wx-config --cxxflags and ~/wxWidgets-3.1.4/buildGTK/wx-config --libs for building your software.
Thank you.
And you are certainly encouraged to use latest release version. It may not be marked as stable by *nix distributions, but it eventually will when it becomes 3.2.0 (hopefully in the next couple of month).
Re: wxDataViewListCtrl on click item action not executing.
I tried building it with wx version 3.1.4, it is still not working, nothing prints to the console no error, I think there is something wrong in my code. I have to review the whole project I suppose.ONEEYEMAN wrote: ↑Wed Jan 13, 2021 11:25 pm Hi,
You don't have to install it.
You can just download it, build it it, and then use its wx-config for building you software. And also build and run the sample.
To build:
1. Download and unpack in for example ~/wxWidgets-3.1.4
2. cd ~/wxWidgets-3.1.4
3. mkdir buildGTK
4. cd buildGTK
5. ../configure --enable-debug --with-gtk=3 && make
Then use ~/wxWidgets-3.1.4/buildGTK/wx-config --cxxflags and ~/wxWidgets-3.1.4/buildGTK/wx-config --libs for building your software.
Thank you.
And you are certainly encouraged to use latest release version. It may not be marked as stable by *nix distributions, but it eventually will when it becomes 3.2.0 (hopefully in the next couple of month).
Re: wxDataViewListCtrl on click item action not executing.
Hi,
Yes, something is very fishy happenning there.
Try to create the control with "this" (Browser) pointer as a parent.
If that doesn't help - strip down you code until it starts working.
And do use the:
code and without the ID of the control.
Thank you.
Yes, something is very fishy happenning there.
Try to create the control with "this" (Browser) pointer as a parent.
If that doesn't help - strip down you code until it starts working.
And do use the:
Code: Select all
wxDVC->Bind()
Thank you.