Also I don't believe this is related, but it seems like Code::Blocks does not recognize the platform specifc macros like __linux__ as you can see in the image above. It greys out what's inside the preprocessor, however this is purely visual, as the code still compiles as expected.I think this feature is not aware of the standard defines the compiler does, so it can not work properly for them (this is only a guess)...
This event is currently emitted under Windows only.
If i press cancel codeblocks locks it self and i have to force kill it.this is wrong. The cause of this lock was that the mouse does not work. If i use the keyboard to select "cancel" all works as the assert never triggered. If i use the mouse to select a button of the error message, the message box jumps into the background of the app and i am not able to bring anything into foreground but the task manager. So this messes pretty hard with the event and window system. I try now to process this event and look if the assert does not trigger and some unexpected behavior pops up...
diff --git a/src/include/cbstyledtextctrl.h b/src/include/cbstyledtextctrl.h
index 3dfe95161..54d271c82 100644
--- a/src/include/cbstyledtextctrl.h
+++ b/src/include/cbstyledtextctrl.h
@@ -78,6 +78,7 @@ class DLLIMPORT cbStyledTextCtrl : public wxScintilla
void MakeNearbyLinesVisible(int line);
private:
void OnContextMenu(wxContextMenuEvent& event);
+ void OnMouseCaptureLost(wxMouseCaptureLostEvent& event);
void OnKillFocus(wxFocusEvent& event);
void OnSetFocus(wxFocusEvent& event);
void OnMouseMiddleDown(wxMouseEvent& event);
diff --git a/src/sdk/cbstyledtextctrl.cpp b/src/sdk/cbstyledtextctrl.cpp
index 2382a3396..fd256f354 100644
--- a/src/sdk/cbstyledtextctrl.cpp
+++ b/src/sdk/cbstyledtextctrl.cpp
@@ -35,6 +35,7 @@ std::map<int, std::set<int> > cbStyledTextCtrl::CommentLexerStyles;
BEGIN_EVENT_TABLE(cbStyledTextCtrl, wxScintilla)
EVT_CONTEXT_MENU(cbStyledTextCtrl::OnContextMenu)
+ EVT_MOUSE_CAPTURE_LOST(cbStyledTextCtrl::OnMouseCaptureLost)
EVT_KILL_FOCUS (cbStyledTextCtrl::OnKillFocus)
EVT_MIDDLE_DOWN (cbStyledTextCtrl::OnMouseMiddleDown)
EVT_MIDDLE_UP (cbStyledTextCtrl::OnMouseMiddleClick)
@@ -112,6 +113,11 @@ void cbStyledTextCtrl::OnContextMenu(wxContextMenuEvent& event)
}
}
+void cbStyledTextCtrl::OnMouseCaptureLost(wxMouseCaptureLostEvent& event)
+{
+
+}
+
void cbStyledTextCtrl::OnMouseMiddleDown(wxMouseEvent& event)
{
m_middleClickPos = PositionFromPoint(wxPoint(event.GetX(), event.GetY()));
All you have to do is hold down the left mouse button in the text editor and then press the right mouse button. The text editor must first be in focus as well it seems. Just as an extra note I'm running the same nightly as before which was svn 11176 using wx3.0.3.I can reproduce it now.
Code::Blocks still seems to be unaware of platform specifc #defines like __linux__ so if there is a way to fix that I would appreciate it. It seems to be aware of stuff like __GNUC__ But not the platform ones.To fix it just disable it in the settings. I should make it off by default because this is one of the more frequent questions.
To fix it just disable it in the settings. I should make it off by default because this is one of the more frequent questions.
I wasn't wanting to disable it, I was wanting it to recognize the platform preproccesor. It does work properly for everything else, but it's greying out the platform macros like __linux__ when it shouldn't. I am on Linux, The compiler knows it, I know it, but Code::Blocks apparently doesn't. I don't quite understand why.Then you need to provide a patch which fixes this limitation of the feature in its current implementation...
I was able to make it happen twice. I'm not 100% sure what causes it, but I'm certain it's another wxWidgets issue.I doubt it is wxwidgets issue.
I think it had something to do with it trying to show the arguments for the function I was writing, in this case printf() and trying to do code completion at the same time, in this case looking for SDL_GetError(). That's my best guess.Yes it is related to the showing of the tooltip with the function arguments.