User forums > Help

problem with creating new console project

(1/2) > >>

clyfish:
When I create a console project, the dialog "Please set the language you want to use" disappeared in the last nightly builds(rev 4749).

Now I can only create a c++ project.
How to create a c project?

rev 4592 is OK.

Thanks.

Biplab:
It works as intended. Please check again. :)

clyfish:

--- Quote from: Biplab on December 24, 2007, 09:55:57 am ---It works as intended. Please check again. :)

--- End quote ---
After checking again, I found that rev4592 had the same wrong behaviour.

It can be reproduced by:
1. create a "Win32 GUI project" project
2. create a "Console application" project
In step 2 the dialog to select language disappeared.

clyfish:
I have filed a bug report.
[ Bug #12780 ]

The problem is in the win32 gui project wizard script.
[CB path]\share\CodeBlocks\templates\wizard\win32gui\wizard.script [line 60-66]

--- Code: ---function OnGetNextPage_CompilerPage()
{
    if (GetCompilerFactory().CompilerInheritsFrom(Wizard.GetCompilerID(), _T("msvc*")))
        return _T("PsdkPath");
    else
        return _T("");
}
--- End code ---

All CompilerPanel's m_PageName is "CompilerPage".
/src/plugins/scriptedwizard/wizpage.cpp [line 447-449]

--- Code: ---WizCompilerPanel::WizCompilerPanel(const wxString& compilerID, const wxString& validCompilerIDs, wxWizard* parent, const wxBitmap& bitmap,
                                    bool allowCompilerChange, bool allowConfigChange)
    : WizPageBase(_T("CompilerPage"), parent, bitmap),
--- End code ---

So "OnGetNextPage_CompilerPage" is called.
/src/plugins/scriptedwizard/wizpage.cpp [line 93-111]

--- Code: ---wxWizardPage* WizPageBase::GetNext() const
{
    try
    {
        wxString sig = _T("OnGetNextPage_") + m_PageName;
        SqPlus::SquirrelFunction<wxString&> cb(cbU2C(sig));
        if (cb.func.IsNull())
            return wxWizardPageSimple::GetNext();
        wxString next = cb();
        if (next.IsEmpty())
            return 0;
        return s_PagesByName[next];
    }
    catch (SquirrelError& e)
    {
        Manager::Get()->GetScriptingManager()->DisplayErrors(&e);
    }
    return wxWizardPageSimple::GetNext();
}
--- End code ---

So if you has create a win32 gui project, all other project wizard will finish at CompilerPage.(because OnGetNextPage_CompilerPage() return _T("")?)

I don't know how to solve this bug.

Biplab:

--- Quote from: clyfish on December 24, 2007, 03:23:34 pm ---I have filed a bug report.
[ Bug #12780 ]
....

I don't know how to solve this bug.

--- End quote ---

I can confirm this bug. Thanks for the investigation and the bug report. I'll look into it. :)

Navigation

[0] Message Index

[#] Next page

Go to full version