News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Closing tabs..

Started by David Perfors, July 17, 2005, 06:18:59 PM

Previous topic - Next topic

David Perfors

I am playing with my new plugin UML::Blocks and I run into a problem...

I made a new tab in the editor like this(this is the whole source of the BaseView class header file):
class BaseView : public EditorBase
{
public:
BaseView(wxWindow* parent, const wxString& title);
virtual ~BaseView();
virtual bool Close();
protected:
private:
};

I throw the parameters of the constructor to EditorBase.

I can open this tab by creating a new instance of BaseView. But I can't close this tab. Howto do this?[/code]
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

mandrav

EditorBase has this:
bool EditorBase::Close()
{
   Destroy();
   return true;
}


Or you could call Manager::Get()->GetEditorManager()->Close(EditorBase*). EditorManager is responsible for all editors after all...

Yiannis.
Be patient!
This bug will be fixed soon...

David Perfors

hmm, ok, but the option "close" in the file menu is disabled, how could I enable it?
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

mandrav

It's enabled in CVS now. File/Close and File/Save was checking for active cbEditor. Changed it to check for active EditorBase-derived editors.

Yiannis.
Be patient!
This bug will be fixed soon...

David Perfors

OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring