std::string filename = wx2std(mwxURL->GetValue());
     size_t s = filename.length();
 
-    WxConsole* C = WxConsole::GetInstance();
+    WxConsole* C = mWxConsole; //::GetInstance();
     if (C != 0)
       {
        if ((s>3) && (filename[s-1]=='s')
 
   };
 
  
+
+  class WxConsole;
+
   class WxBrowser : public wxPanel
   {
   public:
 
     void SetSize( wxSize );
 
+    void SetWxConsole( WxConsole* c ) { mWxConsole = c; }
+
   private:
     WxHtmlWindow* mwxHtmlWindow;
     wxTextCtrl* mwxURL;
     wxButton* mwxHomeButton;
     wxButton* mwxReloadButton;
     wxButton* mwxIncludeFileButton;
- 
+    
+    WxConsole* mWxConsole;
+    
    // any class wishing to process wxWidgets events must use this macro
     DECLARE_EVENT_TABLE()  
   };