Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main:run - legacy method? #3470

Closed
nhthn opened this issue Jan 25, 2018 · 2 comments
Closed

Main:run - legacy method? #3470

nhthn opened this issue Jan 25, 2018 · 2 comments
Labels
comp: class library SC class library comp: help schelp documentation comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"

Comments

@nhthn
Copy link
Contributor

nhthn commented Jan 25, 2018

Main:run is a blank instance method with the following comment in its source code:

// used to be called by command-R, customisation now via CocoaMenuItem
//interpreter.interpretPrintCmdLine;

the help file says you can override this:

+ Main {
    run { "myPatch.rtf".load }
}

this is a pretty bad suggestion because multiple overrides will conflict with each other. i'm pretty sure this is what we have startup.scd and Class.initClass for.

the only place Main:run seems to be called in the class lib is a single line in scel.

i'm pretty sure this is a legacy method, and thus should be documented as such -- does anyone more knowledgeable on its history have an explanation?

@nhthn nhthn added the comp: help schelp documentation label Jan 25, 2018
@telephon
Copy link
Member

telephon commented Jan 25, 2018

Its origin is in SC2, which was closed source and there was SCPlay that allowed you to run "images" or "applications" with sclang code. These could use the run method for set up. Since sc3 has come out as open source, the method has been used in the same way, for standalone applications.

I don't think it is legacy code really, it's just used in very specific cases (the name suggesting the opposite!). The initClass methods have a slightly different meaning/intent, but could be used for the same purpose of course. But probably the main question is whether the startup file is a valid replacement.

@vivid-synth vivid-synth added comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" comp: class library SC class library labels Jan 27, 2018
@nhthn
Copy link
Contributor Author

nhthn commented Aug 29, 2018

no resolution to this discussion.

@nhthn nhthn closed this as completed Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: class library SC class library comp: help schelp documentation comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Projects
None yet
Development

No branches or pull requests

3 participants