class wxSearchCtrl has no member named GetLineText

General discussions
Locked
radiometer
Posts: 27
Joined: Sun Mar 20, 2011 4:27 am

class wxSearchCtrl has no member named GetLineText

Post 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
radiometer
Posts: 27
Joined: Sun Mar 20, 2011 4:27 am

Re: class wxSearchCtrl has no member named GetLineText

Post 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.
radiometer
Posts: 27
Joined: Sun Mar 20, 2011 4:27 am

Re: class wxSearchCtrl has no member named GetLineText

Post 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...
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Re: class wxSearchCtrl has no member named GetLineText

Post by anonbeat »

I will take a look and try to solve the issue.

Thanks for the bug report.
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Re: class wxSearchCtrl has no member named GetLineText

Post by anonbeat »

Please update to latest changes and let me know

Thanks again for your help
radiometer
Posts: 27
Joined: Sun Mar 20, 2011 4:27 am

Re: class wxSearchCtrl has no member named GetLineText

Post by radiometer »

Thanks for looking into this. I'll try it as soon as I'm back from the christmas break.
radiometer
Posts: 27
Joined: Sun Mar 20, 2011 4:27 am

Re: class wxSearchCtrl has no member named GetLineText

Post 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.
Locked