Page 1 of 1

class wxSearchCtrl has no member named GetLineText

Posted: Mon Dec 07, 2020 9:00 pm
by radiometer
I'm trying to build Guayadeque on openSUSE Tumbleweed (every once in a while when too much of the underlying system changed) and get the following error:

Code: Select all

src/ui/mediaviewer/MediaViewer.cpp: In member function ‘void Guayadeque::guMediaViewer::OnSearchSelected(wxCommandEvent&)’:
src/ui/mediaviewer/MediaViewer.cpp:735:38: error: ‘class wxSearchCtrl’ has no member named ‘GetLineText’; did you mean ‘GetLabelText’?
  735 |     m_SearchText = m_SearchTextCtrl->GetLineText( 0 );
(same in line 769)

The method exists in the class wxTextCtrl, but not in wxSearchCtrl according to the official documentation.
My wxWidgets development headers are from the package wxGTK3-3_2-devel which is (unlike the name suggests) for wx 3.1.4.

Cheers,
Philipp

Re: class wxSearchCtrl has no member named GetLineText

Posted: Sun Dec 13, 2020 12:03 pm
by radiometer
Hmm, wxSearchCtrl is derived from wxTextCtrl, so the virtual method GetLineText should be found. I don't understand why this doesn't work.

Re: class wxSearchCtrl has no member named GetLineText

Posted: Mon Dec 14, 2020 9:21 am
by radiometer
I got it built by switching back to wxWidgets 3.0.4 with the gtk2 backend (--toolkit=gtk2 in CMakeLists.txt). There is a conflict of libraries, because the only available version of wxsqlite3 in Tumbleweed depends on wx_baseu 3.1.4, wheras the rest of the program is linked to 3.0.4. Looks pretty fagile, but for now it's working. Let's see for how long...

Re: class wxSearchCtrl has no member named GetLineText

Posted: Sun Dec 20, 2020 10:56 am
by anonbeat
I will take a look and try to solve the issue.

Thanks for the bug report.

Re: class wxSearchCtrl has no member named GetLineText

Posted: Mon Dec 21, 2020 12:40 pm
by anonbeat
Please update to latest changes and let me know

Thanks again for your help

Re: class wxSearchCtrl has no member named GetLineText

Posted: Mon Dec 28, 2020 1:44 pm
by radiometer
Thanks for looking into this. I'll try it as soon as I'm back from the christmas break.

Re: class wxSearchCtrl has no member named GetLineText

Posted: Thu Jan 07, 2021 10:56 am
by radiometer
Building against wxWidgets 3.1.4 now works. Thank you!

If anyone tries to do the same on Tumbleweed: currently the only available package for wxsqlite3 still uses gtk2. So I had to build this from source, too.