Comments (11)
You need to pass an instance of MyTextCompleter to wx.TextCtrl.AutoComplete(). Change this:
text.AutoComplete(MyTextCompleter)
to text.AutoComplete(MyTextCompleter())
.
I'll see if I can figure out how to submit a PR to update the example.
from phoenix.
from phoenix.
thank you but with your suggested change the SO example crashes the python interpreter
from phoenix.
...when you start typing in textctrl
from phoenix.
I think we must do:
mytextcompleter = MyTextCompleter()
text.AutoComplete(mytextcompleter)
from phoenix.
I can't reproduce that easily because wx.TextCtrl.AutoComplete(wx.TextCompleter) isn't implemented on wxGTK. :-(
Does @HelioGuilherme66 suggestion work? If so, then there is probably a memory management bug here. The wxWidgets documentation says that wxTextEntry is supposed to take control of the object and delete it when it is done with it. I suspect Python may be releasing the object before wxTextEntry is done with it.
from phoenix.
Actually, the code runs without my proposal (I have it commented in my code). Sorry.
I am too with Linux, and the autocomplete does not work.
from phoenix.
@mprosperi, can you see if this PR fixes the crash:
#53
from phoenix.
@mprosperi, it looks like Robin merged my PR. Can you try the latest snapshot build now and see if the crash is fixed?
from phoenix.
yes, it's fixed
from phoenix.
Can you close this issue please?
from phoenix.
Related Issues (20)
- Call to wx.aui.AuiNotebook() causes segmentation fault in 4.2.1 on ARM Mac with conda's py 3.10
- Build wxpython on Debian, MX-21, Ubuntu 22.04 failed HOT 12
- Snapshot build(s) have stopped building HOT 7
- Importing wx.media on Windows HOT 5
- Unable to install wxPython on OpenSUSE 15.5 in venv - python-config not found. HOT 7
- PropertyGridManager does not handle the issue of parent property display disorder. HOT 3
- Is it possible to create wheel from actual master branch? HOT 10
- BusyCursor docs are outdated HOT 1
- 4-byte characters (emojis) in StaticText/TextCtrl/Button/ListCtrl/... labels or values cause string truncation HOT 2
- Recent sip related change to build.py breaks building from source on GTK HOT 2
- wx.EVT_ENTER_WINDOW not Triggering on Windows 11, working in Ubuntu & Artix HOT 16
- Bug on RibbonBar RecalculateTabSizes
- A Segmentation fault is caused by wxpython 4.2.1 + python 3.12.1 HOT 1
- "python setup.py bdist_wheel" Error while installing wxPython HOT 1
- SystemError: <slot wrapper '__init__' of 'sip.simplewrapper' objects> returned a result with an error set HOT 2
- Native error dialog on MacOS does not show exclamation mark icon
- importing wx in app run on GitHub actions will segfault on termination HOT 1
- AttributeError: module 'wx.html2' has no attribute 'New' HOT 1
- EditLabel on CustomTreeCtrl doesn't automatically select the entire text
- how can i hide the button on wx.GenericDirCtrl tree?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoenix.