Re: IDE: Accessing main settings outside of ScIDE::Main class

[email protected]
Newsgroups gmane.comp.audio.supercollider.devel
Message-ID <[email protected]>
---- On Sat, 03 Feb 2018 15:13:09 +0800 <[email protected]> wrote ---- 
> Presumably, in onInterpreterStart(), I need a "Settings::Manager *settings = ... something..." but I have no idea what that "something" should be. "main.hpp" has: 
>  
> public: 
>     static Main * instance(void) ... blah blah... 
>     ... blah blah... 
>     static Settings::Manager *settings()       { return instance()->mSettings;       } 
>  
> But "ScIDE::Main::settings()" produces: 
>  
> In file included from /home/dlm/share/supercollider/editors/sc-ide/widgets/main_window.cpp:33:0: 
> /home/dlm/share/supercollider/editors/sc-ide/widgets/help_browser.hpp: In member function ‘void ScIDE::HelpBrowserDocklet::onInterpreterStart()’: 
> /home/dlm/share/supercollider/editors/sc-ide/widgets/help_browser.hpp:170:37: error: incomplete type ‘ScIDE::Main’ used in nested name specifier 
>        Settings::Manager *settings = ScIDE::Main::settings(); 

Elsewhere in the source code, I see e.g. "MainWindow::instance()" and even "Main::instance()" (widgets/settings/dialog.cpp:109). But here, "Main::instance()->settings()" produces the same error.

So what's the problem?

hjh


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.