ERROR:Class extension for nonexistent class 'Document' (command line)

Is anybody able to shed light on why I get the following when launching a file from the command line?:

ERROR: Class extension for nonexistent class ‘Document’
In file:‘…/…/…/…/…/Users/kameronospen/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Lang/Workflow/extDocument-openStartup.sc’
ERROR: Class extension for nonexistent class ‘Document’
In file:‘…/…/…/…/…/Users/kameronospen/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Lang/Workflow/extDocument-closeAllHelp.sc’

There is no such message when launching in the IDE. Thx…

Document requires an editor.

When you run SC from the command line, there’s no editor – hence no documents.

So SC doesn’t load the class. (There’s no reason to load it, as Document has nothing to operate on in this case.)

If SC otherwise functions normally at the command line, you can ignore the messages.

If it’s broken at the command line because of this (I think it probably isn’t, 99% sure you can just ignore it), there’s a way to configure the language – but probably not necessary so I’d rather not lead you down that path unless it’s really necessary.

We’ve never had “official” recommendations about extensions to conditionally-loaded classes. It’s probably not ideal for wslib to package Document extensions in the same big ball with more generally-applicable extensions – but there isn’t a fully established practice for it either. Not quite correct – see the next post.

hjh

it’s not documented very prominently, but folders of the form scide_<env-name> are loaded only when sclang is run with -i <env-name>. the when running sclang from the IDE is “scqt”. one could fix this by moving extDocument-closeAllHelp.sc under an scide_scqt folder; that is in fact what SC’s own class library does.

documentation for this is here: https://doc.sccode.org/Classes/Platform.html#*ideName, although it’s a bit out of date as ‘scapp’ isn’t used anymore – it changed to ‘scqt’ for the qt-based main IDE.

1 Like

Ah, I completely forgot about that.

I opened an issue on the wslib repository. The methods defined in these files appear to be outdated, so it isn’t clear to me whether we should move them under a scide_scqt directory or deprecate/delete them. TBH I tend to favor the latter.

hjh