From 5b399b4293c35d9d90c552bb3644c4c11833210b Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 8 Dec 2011 13:29:49 +0100 Subject: [PATCH] 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 --- sc/Emacs.sc | 6 ++++++ sc/extBuffer.sc | 7 +------ sc/extString.sc | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sc/Emacs.sc b/sc/Emacs.sc index d1dcb1e..5042046 100644 --- a/sc/Emacs.sc +++ b/sc/Emacs.sc @@ -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; diff --git a/sc/extBuffer.sc b/sc/extBuffer.sc index aa98191..8eab30b 100644 --- a/sc/extBuffer.sc +++ b/sc/extBuffer.sc @@ -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; diff --git a/sc/extString.sc b/sc/extString.sc index 0c63377..5feec7a 100644 --- a/sc/extString.sc +++ b/sc/extString.sc @@ -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);