News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Any comments about 'Dreaded DDE-open bug related' ?

Started by Loaden, August 20, 2010, 05:49:18 PM

Previous topic - Next topic

Loaden

Quotevoid NativeParser::CreateClassBrowser()
{
    ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("code_completion"));
    if (!m_pClassBrowser && cfg->ReadBool(_T("/use_symbols_browser"), true))
    {
        bool isFloating = cfg->ReadBool(_T("/as_floating_window"), false);

        if (!isFloating)
        {
            // make this a tab in projectmanager notebook
            m_pClassBrowser = new ClassBrowser(Manager::Get()->GetProjectManager()->GetNotebook(), this);
            Manager::Get()->GetProjectManager()->GetNotebook()->AddPage(m_pClassBrowser, _("Symbols"));
            m_pClassBrowser->UpdateSash();
        }
        else
        {
            m_pClassBrowser = new ClassBrowser(Manager::Get()->GetAppWindow(), this);

            // make this a free floating/docking window
            CodeBlocksDockEvent evt(cbEVT_ADD_DOCK_WINDOW);

            evt.name = _T("SymbolsBrowser");
            evt.title = _("Symbols browser");
            evt.pWindow = m_pClassBrowser;
            evt.dockSide = CodeBlocksDockEvent::dsRight;
            evt.desiredSize.Set(200, 250);
            evt.floatingSize.Set(200, 250);
            evt.minimumSize.Set(150, 150);
            evt.shown = true;
            evt.hideable = true;
            Manager::Get()->ProcessEvent(evt);
            m_pClassBrowser->UpdateSash();
        }
        m_ClassBrowserIsFloating = isFloating;

        // Dreaded DDE-open bug related: do not touch unless for a good reason
//        m_pClassBrowser->SetParser(m_pParser);

    }
}

What is the 'DDE-open bug' ?
If i uncomment the line "m_pClassBrowser->SetParser(m_pParser);", CC also works fine, include open file through DDE.

MortenMacFly

Quote from: Loaden on August 20, 2010, 05:49:18 PM
What is the 'DDE-open bug' ?
IIRC it was the following:
Windows reserves just about 5 secs for a DDE call to succeed. If parsing takes longer the return event comes too late, so the calling application using DDE "hangs".

However, you can also try to use SVN blame to find out when this was commented.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Loaden

Quote from: MortenMacFly on August 20, 2010, 10:09:54 PM
Quote from: Loaden on August 20, 2010, 05:49:18 PM
What is the 'DDE-open bug' ?
...
However, you can also try to use SVN blame to find out when this was commented.

Quotemandrav  2008-2-23 22:14:40           
* Seemingly fixed dreaded DDE bug on windows.
* Parse project(s) for symbols when opening through the command-line.
But even if I do not comment this line, through the command line to open the project is parsing correct, include class browser.

Loaden

Of course, I have rewritten SetParser function, and added a temporary Parser, So, I think do not have this problem now.

MortenMacFly

Quote from: Loaden on August 21, 2010, 12:49:54 AM
Of course, I have rewritten SetParser function, and added a temporary Parser, So, I think do not have this problem now.
So - it *might* work now. In fact, since so many things have changed it may have become obsolete.

I can try my self to use it again on large workspaces / projects. I'll report back.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]