[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] Platform.recompile
Perhaps som OSX people will find the following menu item ofr turning off
extension and recompiling useful:
Assign a keycommand (I use cmd-shift-r) over OSX
{var m,q;
//m = CocoaMenuItem.new(nil, 8, "Help", true);
File.exists(Platform.userAppSupportDir++"/extensions-off").if{
q = CocoaMenuItem.new('Help', 8, "extensions on", false,{
"mv %/% %/%; osascript %%"
.format(Platform.userAppSupportDir.escapeChar($ ),
"Extensions-off",
Platform.userAppSupportDir.escapeChar($ ),
"Extensions").unixCmd;
thisProcess.recompile;
});
}{
q = CocoaMenuItem.new('Help', 8, "extensions off", false,{
"mv %/% %/%; osascript %%"
.format(Platform.userAppSupportDir.escapeChar($ ), "Extensions",
Platform.userAppSupportDir.escapeChar($ ),
"Extensions-off").unixCmd;
thisProcess.recompile;
});
};
}.value;
jostM
nescivi wrote:
> Hiho,
>
> it is easy to add Platform.recompile for Linux/Scel as well, like the diff
> below.
>
> But...
> It would be cleaner if we start adding the feature \scapp and implement the
> switch in Platform, so it would be something like this in Platform (instead
> of subclass responsibility):
>
>
> +Platform{
> recompile{
> if ( this.hasFeature( \emacs ) ) {
> Emacs.evalLispExpression( "(sclang-start)" );
> };
> if ( this.hasFeature( \scapp ) ) {
> recompile { _Recompile } // maybe rename primitive to _SCappRecompile ??
> };
> }
> }
>
> Thoughts?
>
> I'll commit the diff below for the time being.
>
> sincerely,
> Marije
>
>
> Index: build/SCClassLibrary/Platform/linux/LinuxPlatform.sc
> ===================================================================
> --- build/SCClassLibrary/Platform/linux/LinuxPlatform.sc (revision
> 8281)
> +++ build/SCClassLibrary/Platform/linux/LinuxPlatform.sc (working copy)
> @@ -28,4 +28,10 @@
> this.loadStartupFiles;
> }
> defaultHIDScheme { ^\linux_hid }
> +
> + recompile{
> + if ( this.hasFeature( \emacs ) ) {
> + Emacs.evalLispExpression( "(sclang-start)" );
> + };
> + }
> }
>
> _______________________________________________
> sc-dev mailing list
>
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-dev/
> search: https://listarc.bham.ac.uk/lists/sc-dev/search/
>
>
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/