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

[email protected]
Newsgroups gmane.comp.audio.supercollider.devel
Message-ID <CAB_zQYu8P_k2kP5=sPYUCd31Uvkj6Ayu1NJ0zdY=QV+rYOip2A@mail.gmail.com>
> > /home/dlm/share/supercollider/editors/sc-ide/widgets/help_browser.hpp:170:37:
error: incomplete type ‘ScIDE::Main’ used in nested name specifier

"Incomplete type" means the type you're trying to use is incomplete, i.e.
not fully defined. Probably you are missing an include and/or have includes
that only make forward declarations.

https://stackoverflow.com/questions/10446494/incomplete-type-error

-Brian

On Sat, Feb 3, 2018 at 4:47 AM, <[email protected]> wrote:

> ---- 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.