editors: avoid IDE-specific overwrites by introducing IDE actions

scel currently uses method overwrites to control the IDE gui. this can be
avoided by using actions, which can be set in order to override the default
behavior

Signed-off-by: Tim Blechmann <tim@klingt.org>
This commit is contained in:
Tim Blechmann 2011-12-08 13:29:49 +01:00
parent 1569625efa
commit 5b399b4293
3 changed files with 9 additions and 8 deletions

View file

@ -237,6 +237,12 @@ Emacs {
Class.initClassTree(AbstractResponderFunc);
Class.initClassTree(OSCresponder);
Class.initClassTree(Server);
Platform.makeServerWindowAction = {|aServer, aWindow| aServer.makeEmacsWindow };
Platform.makeSynthDescWindowAction = {|aSynthDesc| aSynthDesc.makeEmacsWindow };
Platform.openHelpFileAction = {|aString| aString.openHelpFileEmacs };
Platform.openHTMLFileAction = {|aString| aString.openHTMLFileEmacs };
requestHandlers = IdentityDictionary.new;
requestAllocator = StackNumberAllocator(0, 128);
keys = IdentityDictionary.new;

View file

@ -1,9 +1,4 @@
+ Server {
makeWindow { arg w;
this.makeEmacsWindow( w );
}
makeEmacsWindow { arg w;
var active, booter, killer, makeDefault, running, booting, stopped;
var recorder, scoper;
@ -158,7 +153,7 @@
}
+ SynthDesc {
makeWindow {
makeEmacsWindow {
var w, s, startButton, sliders;
var id, cmdPeriodFunc;
var synthDesc;

View file

@ -18,13 +18,13 @@
+ String{
openHelpFile {
openHelpFileEmacs {
if ( Emacs.initialized) {
Emacs.evalLispExpression(['sclang-find-help', this].asLispString);
}
}
openHTMLFile {
openHTMLFileEmacs {
if ( Emacs.initialized) {
// this.findHelpFile;
Emacs.evalLispExpression(['w3m-browse-url', this].asLispString);