Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
wxWidgets 3.1.2 Released
Miguel Gimenez:
The wxPopupWindow used in Code Completion was reimplemented under MSW with heavy changes, see:
https://github.com/wxWidgets/wxWidgets/commit/56c419116838045f23f046112960d4e42f98f80d#diff-ae8d87556bfe1b32c101c69c2fb1cec4
This changes include moving focus back and forth; these must be triggering the KillFocus event which destroys the popup.
oBFusCATed:
Someone needs to report this to wx devs. I intend to do some testing in the next days, but I'm not sure that my windows would start up. So if someone can modify the stc sample to reproduce the problem it will be best.
It seems this is a critical issue, so moving forward with wx 3.1.2 is blocked by this. Interesting why codelite is not affected...
New Pagodi:
I don't know if this is helpful or not, but here's a patch to add a very rudimentary type of autocompletion to the wxWidgets stc sample. It doesn't show the crash under discussion, so it might not be helpful at all.
--- Code: ---diff --git a/samples/stc/edit.cpp b/samples/stc/edit.cpp
index 7e7f412ec2..c16b1aae2b 100644
--- a/samples/stc/edit.cpp
+++ b/samples/stc/edit.cpp
@@ -60,6 +60,21 @@ const int ANNOTATION_STYLE = wxSTC_STYLE_LASTPREDEFINED + 1;
// Edit
//----------------------------------------------------------------------------
+static char * pound_xpm[] = {
+"10 10 2 1",
+" c None",
+". c #BD08F9",
+" .. .. ",
+" .. .. ",
+"..........",
+"..........",
+" .. .. ",
+" .. .. ",
+"..........",
+"..........",
+" .. .. ",
+" .. .. "};
+
wxBEGIN_EVENT_TABLE (Edit, wxStyledTextCtrl)
// common
EVT_SIZE ( Edit::OnSize)
@@ -177,6 +192,10 @@ Edit::Edit (wxWindow *parent, wxWindowID id,
CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key
SetLayoutCache (wxSTC_CACHE_PAGE);
UsePopUp(wxSTC_POPUP_ALL);
+
+ wxImage::AddHandler(new wxXPMHandler);
+ wxBitmap b(pound_xpm);
+ RegisterImage(0, b);
}
Edit::~Edit () {}
@@ -483,6 +502,13 @@ void Edit::OnCharAdded (wxStyledTextEvent &event) {
SetLineIndentation (currentLine, lineInd);
GotoPos(PositionFromLine (currentLine) + lineInd);
}
+ else if (chr == '#') {
+ wxString s = "define?0 elif?0 elifdef?0 elifndef?0 else?0 endif?0 "
+ "error?0 if?0 ifdef?0 ifndef?0 include?0 line?0 line?0 "
+ "pragma?0 undef?0";
+
+ AutoCompShow(0,s);
+ }
}
--- End code ---
oBFusCATed:
Strange. I guess we're doing something 'advanced'...
ollydbg:
There are many code in the file: sdk\wxscintilla\src\PlatWX.cpp, which change focus to it's parent, maybe, they get conflict which the current wx3.1.2's implementation.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version