Missing AutoComplete Functionality (Issue #23149)

60 views
Skip to first unread message

Scott Furry

unread,
Jan 17, 2023, 2:53:24 AM1/17/23
to wx-...@googlegroups.com, Subscribed

Description

AutoComplete functionality does not appear to function as expected or documented for the MacOS platform.

Forum Thread "AutoComplete does not work", from Sept 2022, suggests using the Widgets sample application. Following the recommended steps from the thread, AutoComplete could not be activated in a wxTextCtrl or other derived classes (wxComboBox et al). No error conditions of problems were encountered. Moderator "doublemax" recommended in thread that OP post bug report of findings. This action does not appear to have been pursued. Last mention of AutoComplete problems in bug reports was from 2019 but not for this platform.

Another Developer makes available select samples that also include AutoComplete testing. After downloading sources and building, the AutoComplete does not function here also. Project sources include explicit testing of wxTextCtrl for AutoComplete functionality and application will fail if not available (see Line 70 of mainframe.cpp for tests).

Platform and version information

  • wxWidgets version you use: 3.2.1
  • wxWidgets port you use: wxOSX
  • OS and its version: macOS 12.6.2 (updated Monterey)

Library built from source locally (i.e. not using homebrew or other Mac-based packaging)
Config

Configured wxWidgets 3.2.1 for `x86_64-apple-darwin21.6.0'

  Which GUI toolkit should wxWidgets use?                 osx_cocoa
  Should wxWidgets be compiled into single library?       yes
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      no
  Which libraries should wxWidgets use?
                                       STL                yes
                                       jpeg               sys
                                       png                sys
                                       regex              sys
                                       tiff               sys
                                       lzma               no
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                no
  • GTK version:
  • Which GDK backend is used:
  • Current theme:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149@github.com>

VZ

unread,
Jan 17, 2023, 9:06:54 AM1/17/23
to wx-...@googlegroups.com, Subscribed

This seems to work here (macOS 12) but completions only appear when pressing F5 which was quite difficult to discover for someone as Mac-illiterate as me: I had to go to the documentation to find it.

I don't know how does this work in the other Mac applications, perhaps we could make this a bit more user-friendly.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1385479109@github.com>

oneeyeman1

unread,
Jan 17, 2023, 10:09:29 AM1/17/23
to wx-...@googlegroups.com, Subscribed

@vadz ,
In MSVC
When I type "myptr->" the list appears.
In Xcode
When I type "myptr->m" the list appears.

Thank you.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1385573373@github.com>

Scott Furry

unread,
Jan 17, 2023, 3:47:28 PM1/17/23
to wx-...@googlegroups.com, Subscribed

This seems to work here (macOS 12) but completions only appear when pressing F5 which was quite difficult to discover for someone as Mac-illiterate as me: I had to go to the documentation to find it.

I could not find a user related reference to this feature. Searching gets references to the common shortcuts for navigation or similar. The words obscure and arcane come to mind...

I don't know how does this work in the other Mac applications, perhaps we could make this a bit more user-friendly.

Wow... Today I learned...
Apps produce the drop down window. It's quirky to use.

In my own application that I'm maintaining, wxCombobox controls will show the drop down list with the F5 key but the listing is not correct. Drop down is populated with text I would expect from an office application despite code calling AutoComplete function using wxArrayString argument.

The details on wxTextCompleter is not really robust. Scouring a web search got me code and Doxygen output from the NCBI Toolkit( here, for example) implementing custom wxTextCompleter classes. I also found the blog post from 2011 announcing the feature. Then nothing. Working example that doesn't involve untangling the mess that is the Widgets sample would be nice.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1386030654@github.com>

VZ

unread,
Jan 17, 2023, 4:53:25 PM1/17/23
to wx-...@googlegroups.com, Subscribed

Well, there is the documentation, which doesn't seem too bad and has a simple example. If you see any concrete problems with it, let's fix them. If you can improve it globally, any contributions are welcome, of course. But other than that I'm just not sure what to do...


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1386117482@github.com>

Scott Furry

unread,
Jan 17, 2023, 5:05:29 PM1/17/23
to wx-...@googlegroups.com, Subscribed

@vadz Can you please direct me to this "simple example". I'm probably looking in the wrong spots or over-thinking what needs to be implemented for wxTextCompleter in an application.

One of the big drawbacks of the samples is that they are not exactly straight-forward. Whole piles of code get squeezed into a single source file. Unravelling the logic is tedious and painful at best. I build the samples to observer functionality but shudder at the idea of walking through the code to see how some feature is implemented. I understand the historical roots of the current state of the samples but rigorous application of UNIX philosophy ("...do one thing and do it well...") would seem a prudent course of action. (yeah, bit of a rant - my bad).


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1386141390@github.com>

VZ

unread,
Jan 17, 2023, 5:42:49 PM1/17/23
to wx-...@googlegroups.com, Subscribed

The simple example is for wxTextCompleterSimple. We don't have a simple example for wxTextCompleter itself because, well, it's not as simple.

The samples are also used to test things, so they also try to be exhaustive, which definitely doesn't help. OTOH we can't really afford to maintain 2 sets of test programs...


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1386182686@github.com>

Scott Furry

unread,
Jan 17, 2023, 7:30:25 PM1/17/23
to wx-...@googlegroups.com, Subscribed

The simple example is for wxTextCompleterSimple. We don't have a simple example for wxTextCompleter itself because, well, it's not as simple.

I saw that. And this is where I start to overthink things...
I'll play with this.

The samples are also used to test things, so they also try to be exhaustive, which definitely doesn't help. OTOH we can't really afford to maintain 2 sets of test programs...

Yup. Try and keep things simple.
I would recommend a chat with the developers who maintain the NCBI C++ Toolkit. It utilize wxWidgets and it appears they may have figure some things out that are not necessarily documented in the library (i.e. wxTextCompleter implementation).

The start point for this rabbit hole of thought was that I was updating code using client data in a wxComboBox. Each string had an associated piece of data attached. Enabling sort on the control would cause corruption as the attached client data associated with the string wasn't being sorted. In cleaning up THAT code, I realized that autocomplete feature was also not working.

I'll mark the autocomplete functionality as work in progress for the next revision of release of my program. We can come back to autocomplete as time permits.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1386284437@github.com>

jpbreen85

unread,
Dec 18, 2023, 12:37:19 AM12/18/23
to wx-...@googlegroups.com, Subscribed

Hello,

I was wondering how progress was going to make the auto complete functionality more "user-friendly" under Mac. Anyway to override the F5 required to show the autocompletions so it happens automatically?

Cheers


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1859589614@github.com>

VZ

unread,
Dec 18, 2023, 8:01:09 AM12/18/23
to wx-...@googlegroups.com, Subscribed

AFAIK nobody is actively working this. Any help would, of course, be welcome, as always.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/1860439275@github.com>

Dan Korn

unread,
Apr 22, 2024, 2:02:38 PM4/22/24
to wx-...@googlegroups.com, Subscribed

I'm having this issue as well, after updating to wxWidgets 3.2.1 (for Silicon support) on Mac.

I noticed that, when the auto-complete popup/drop-down is supposed to be showing, that if I use Command+tab to switch away to another application, the popup is then visible, on top of all other applications. And it stays there, kind of in the way, until I go back to our app and invoke something that closes it.

Also, even if I don't switch away to another app, I can use the arrow keys and Enter to select a string from the (seemingly) invisible auto-complete list.

So the auto-complete popup list is there and showing the correct strings, but it's somehow behind its containing dialog. Therefore, this seems to be an issue with how the popup control is created.

Note that we're using wxWidgets in a plug-in to Abode Acrobat, from a wxStyledTextCtrl in a modal wxDialog. Getting the right window z-order for our modal and modeless dialogs on top of the Acrobat document windows has always been a challenge. But given that you're seeing this in a standalone sample as well, I don't think it's related to the plug-in architecture.

Note also that we're calling AutoCompShow() in an EVT_STC_CHARADDED event when three characters from any string in the list are shown, rather than making the user click F5 or any other special key.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23149/2070462022@github.com>

Reply all
Reply to author
Forward
0 new messages