Recent Posts

Pages: 1 ... 5 6 7 8 9 [10]
91
Using Code::Blocks / Re: problems with wxWidgets app in C::B.
« Last post by alys666 on June 17, 2017, 06:35:35 pm »
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
92
Using Code::Blocks / Re: problems with wxWidgets app in C::B.
« Last post by oBFusCATed on June 17, 2017, 06:08:47 pm »
What is the value of the PATH variable. It seems that C::B sees a value that is different to the one seen in your shell.
What happens if you start C::B from the same shell where wx-version returns what you've expected?
93
Using Code::Blocks / problems with wxWidgets app in C::B.
« Last post by alys666 on June 17, 2017, 05:59:48 pm »
I took fresh sources of wxWidgets (3.0.3) and has it built, as they recommend it. everything if fine, their examples work..etc.
also i made "make install". and installed this lib to usr/local/.
then i tried to attach this version of wxWidgets to my wxWidgets based old code(kinda editor).

i created new project in C::B as console application, and added my files there, deleted generated 'main' file, and took my old.
i added `wx-config --cxxflags' as compiler's 'another options'. and started the build. and got a lot of errors.

and reason of it is the fact, that C::B gets strange command string from this  `wx-config --cxxflags'.
it somehow calls wx-config of wxWidgets 2.8, which i also have on my computer.

***
g++ -Wall -fexceptions -g -v -I/usr/lib/x86_64-linux-gnu/wx/include/base-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DwxUSE_GUI=0 -pthread -Wnon-virtual-dtor -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-include-dirs -Wextra -std=c++11 -m64 -I/usr/local/include/wx-3.0 -I/usr/local/lib/wx/include/gtk2-unicode-3.0 -c /home/alys/HOBBY/CodeEditor/Editor1/ed_common.cpp -o obj/Debug/Editor1/ed_common.o
***

but if i invoke `wx-config --cxxflags' from command line - it says -
-I/usr/local/lib/wx/include/gtk2-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread

in command line "wx-config --version" says - 3.0.3.

so the problem: from command line wx-config shows wxWidgets version - 3.0.3, but if it is invoked by C::B to make compiler call - it has version 2.8 and include dirs are wrong.

system  - Ubuntu 14.04, C::B 16.01.

Thanks.
94
Development / Re: Deadlock of C::B in CodeCompletion
« Last post by oBFusCATed on June 16, 2017, 08:23:40 am »
yvesdm3000: Please re-read the topic! Bat is using wx2.8 and he is having problems that are resolved when the class browser is disabled.

wx3.x is super buggy, but some people are forced to use it on linux. We don't force windows users to use wx3.x builds, so we don't know how buggy it is on windows.
95
Development / Re: Deadlock of C::B in CodeCompletion
« Last post by yvesdm3000 on June 16, 2017, 05:55:53 am »
One could keep current implementation for wx2.8 and switch to a virtual treectrl when on wx3.x ?
We don't have the man power to support/fix one implementation. You're talking about two. :)
Current implementation works fine on 2.8 (or at least seems to be), and for 3.0 we need a new one anyway... How long are we going to keep 2.8 alive ? How many are using 2.8 specific for the actual working classbrowser that could move to 3.0 once classbrowser has been reimplemented ?

Yves
96
Development / Re: Deadlock of C::B in CodeCompletion
« Last post by oBFusCATed on June 15, 2017, 07:49:22 pm »
One could keep current implementation for wx2.8 and switch to a virtual treectrl when on wx3.x ?
We don't have the man power to support/fix one implementation. You're talking about two. :)
97
Development / Re: Deadlock of C::B in CodeCompletion
« Last post by Bat on June 15, 2017, 07:06:55 pm »
I used virtual treectrl (out of wx, directly on win32 code) long time ago. It's clear that performance is really good - but there are messages flowing asking for data. Theses messages must be answered without too much wait (else it will freeze UI), so a kind of double buffering must be put in place.
P.S. No crash since I disabled ClassBrowser
98
Development / Re: Deadlock of C::B in CodeCompletion
« Last post by yvesdm3000 on June 15, 2017, 06:05:42 pm »
In fact it should be done in batchs - update X nodes in a single event, then let some of the other events be processed, then update X more nodes and so on. The other option is switching to a virtual treectrl, but these are only available in wx3.x...
One could keep current implementation for wx2.8 and switch to a virtual treectrl when on wx3.x ?

I would greatly welcome a language-agnostic class browser for ClangCC !

Yves
99
Krice: Your argument is half invalid - Codeblocks is written in C++!

Maybe, but it can still be C-style. I guess I could look at the source code to be sure.

Yes, there is some C style stuff. But that's not the worst thing. Checking out the source with CppCheck shows a lot of problems that could be easily fixed. Trust me guys, you want to use CppCheck to improve the quality of the source code.
100
Help / Re: wxsmith crashing after upgrade to Ubuntu 17.04
« Last post by awake on June 14, 2017, 07:08:31 pm »
I have created a sample program to illustrate the problem, which I've included below in case anyone is interested. The problem may be limited to Linux (wxGTK) - ? In any case, I have reported it through the wxWidgets bug tracker, but since this is my first report, it will have to pass through the moderator(s). We'll see what happens ...

On Linux (maybe also Windows/MingW??), the following code can be compiled via command line as follows: g++ example.cpp `wx-config --cxxflags --libs` -o example

When run, the leftmost and rightmost listboxes will accept drag-and-drop of files from a browser, but the middle one will not; the difference is whether the parent is the underlying panel (appropriate for 2.8 builds, and how wxsmith currently generates the code) or is the static box attached to the wxStaticBoxSizer.

Code: [Select]
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include <wx/app.h>
#include <wx/frame.h>
#include <wx/listbox.h>
#include <wx/menu.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/dnd.h>
#include <wx/intl.h>
#include <wx/string.h>


class testApp : public wxApp
{
    public:
        virtual bool OnInit();
};


class testFrame: public wxFrame
{
    public:

        testFrame(wxWindow* parent,wxWindowID id = -1);
        virtual ~testFrame();

    private:

        void OnQuit(wxCommandEvent& event);

        wxListBox* lbPlain;
        wxListBox* lbStatic1;
        wxListBox* lbStatic2;

        DECLARE_EVENT_TABLE()
};


class DF : public wxFileDropTarget
{
    public:

        DF ( wxListBox * lb_target );

        virtual bool OnDropFiles ( wxCoord x, wxCoord y, const wxArrayString & files );

    protected:

        wxListBox * m_target;
};


IMPLEMENT_APP(testApp);


bool testApp::OnInit()
{
    testFrame* Frame = new testFrame(0);
    Frame->Show();
    SetTopWindow(Frame);
   
    return true;
}


//#include <wx/msgdlg.h>


BEGIN_EVENT_TABLE(testFrame,wxFrame)
END_EVENT_TABLE()


testFrame::testFrame(wxWindow* parent,wxWindowID id)
{
    wxBoxSizer* bsOuter;
    wxPanel* Panel1;
    wxBoxSizer* bsInner;
    wxBoxSizer* bsPlain;
    wxStaticBoxSizer* bsStaticBox1;
    wxStaticBoxSizer* bsStaticBox2;
 
    Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));

    // Create the basic foundation: frame contains a standard box sizer (bsOuter)
    // which contains a panel (Panel1) which contains a standard box sizer (bsInner)

    bsOuter = new wxBoxSizer(wxHORIZONTAL);
    Panel1 = new wxPanel(this, wxID_ANY);
    bsInner = new wxBoxSizer(wxHORIZONTAL);
 
    // Create a standard sizer containing a listbox and place it in the inner sizer   

    bsPlain = new wxBoxSizer(wxHORIZONTAL);
    lbPlain = new wxListBox(Panel1, wxID_ANY);
    lbPlain->SetMinSize(wxSize(200,400));
    bsPlain->Add(lbPlain, 1, wxALL|wxEXPAND, 5);
    bsInner->Add(bsPlain, 1, wxALL|wxEXPAND, 5);

    // Create a Static Box sizer containing a listbox and place it in the inner sizer
    // (next to the "plain" sizer created above). Note that the list box it contains is
    // created according to the pre-2.9.1 rules, i.e., parent is Panel1

    bsStaticBox1 = new wxStaticBoxSizer(wxHORIZONTAL, Panel1, _("Static Box Sizer 1"));
    lbStatic1 = new wxListBox(Panel1, wxID_ANY);
    bsStaticBox1->Add(lbStatic1, 1, wxALL|wxEXPAND, 5);
    bsInner->Add(bsStaticBox1, 1, wxALL|wxEXPAND, 5);

    // Create another Static Box sizer containing a listbox and place it next to the
    // bsStaticBox1 created above. Note that the list box this one contains is
    // created according to the 2.9.1 and above rules, i.e., parent is the wxStaticBox
    // contained within the Static Box sizer.

    bsStaticBox2 = new wxStaticBoxSizer(wxHORIZONTAL, Panel1, _("Static Box Sizer 2"));
    lbStatic2 = new wxListBox(bsStaticBox2->GetStaticBox(), wxID_ANY);
    bsStaticBox2->Add(lbStatic2, 1, wxALL|wxEXPAND, 5);
    bsInner->Add(bsStaticBox2, 1, wxALL|wxEXPAND, 5);

    Panel1->SetSizer(bsInner);
    bsInner->Fit(Panel1);
    bsInner->SetSizeHints(Panel1);
    bsOuter->Add(Panel1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
    SetSizer(bsOuter);
    bsOuter->Fit(this);
    bsOuter->SetSizeHints(this);

    lbPlain->SetDropTarget(new DF(lbPlain));
    lbStatic1->SetDropTarget(new DF(lbStatic2));
    lbStatic2->SetDropTarget(new DF(lbStatic2));
}


testFrame::~testFrame()
{
}


void testFrame::OnQuit(wxCommandEvent& event)
{
    Close();
}


DF::DF ( wxListBox * lb_target )
{
    m_target = lb_target;
}


bool DF::OnDropFiles ( wxCoord x, wxCoord y, const wxArrayString & files )
{
    m_target->Append(files);

    return true;
}
Pages: 1 ... 5 6 7 8 9 [10]