User forums > Help

Two issues with C::B 13.12 SVN with wxWidgets 3.1 on OSX 10.10

<< < (2/4) > >>

warpino:
2. the following happens whenever I use the Search menu.
 
 relevant output in the terminal where I launched codeblocks from


--- Code: ---../src/osx/cocoa/combobox.mm(209): assert "item >= 0 && item < [m_comboBox numberOfItems]" failed in SetSelectedItem(): Inavlid item index.
../src/common/sizer.cpp(2091): assert "!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))" failed in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND

--- End code ---

debug log:

http://pastebin.com/YZ6EDf5d

warpino:
I also get this in the wxWidgets debug info popup window:

http://pastebin.com/PsYYaw1m

oBFusCATed:
About FSymbol: This tab is part of the FortranProject plugin. So it is better to report this problem to its author - http://darmar.vgtu.lt/

Can you try if this patch will resolve the search issue?


--- Code: ---diff --git a/src/sdk/findreplacedlg.cpp b/src/sdk/findreplacedlg.cpp
index f2fac92..27d2114 100644
--- a/src/sdk/findreplacedlg.cpp
+++ b/src/sdk/findreplacedlg.cpp
@@ -143,18 +143,20 @@ FindReplaceDlg::FindReplaceDlg(wxWindow* parent, const wxString& initial, bool h
     // load search path options
     XRCCTRL(*this, "txtSearchPath", wxTextCtrl)->SetValue(cfg->Read(CONF_GROUP _T("/search_path"),
                                                                     (active_project ? active_project->GetBasePath() : wxT(""))));
+    wxComboBox *cmbSearchMask = XRCCTRL(*this, "cmbSearchMask", wxComboBox);
        if(cfg->Exists(CONF_GROUP _T("/search_mask")))
        {
                // Migrate from previous config setting of "search_mask" string (since it used to be a textbox)
                // to new config setting of "search_masks" array for the combobox
-               XRCCTRL(*this, "cmbSearchMask", wxComboBox)->Append(cfg->Read(CONF_GROUP _T("/search_mask")));
+               cmbSearchMask->Append(cfg->Read(CONF_GROUP _T("/search_mask")));
                cfg->UnSet(CONF_GROUP _T("/search_mask"));
        }
        else
        {
-               FillComboWithLastValues(XRCCTRL(*this, "cmbSearchMask", wxComboBox), CONF_GROUP _T("/search_masks"));
+               FillComboWithLastValues(cmbSearchMask, CONF_GROUP _T("/search_masks"));
        }
-    XRCCTRL(*this, "cmbSearchMask", wxComboBox)->SetSelection(0);
+       if (cmbSearchMask->GetCount() > 0)
+        cmbSearchMask->SetSelection(0);
 
     XRCCTRL(*this, "chkSearchRecursively", wxCheckBox)->SetValue(cfg->ReadBool(CONF_GROUP _T("/search_recursive"), false));
     XRCCTRL(*this, "chkSearchHidden", wxCheckBox)->SetValue(cfg->ReadBool(CONF_GROUP _T("/search_hidden"), false));

--- End code ---


warpino:
Thank you so much for your help!
Now, I know this is totally OT but I am a total newbie so... could you possibly tell me how to:
1) apply the patch
2) compile and link the patched file without having to rebuild the whole project

Thanks again

oBFusCATed:
1. Probably execute patch -p1 < /path/tofile.diff in the root of the project.
2. If you're using autotools just run make and make install (if you've installed it already).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version