From ba885b3716e6180d3ac1d81049f0a2ebccd042fa Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 10 Jul 2016 17:02:54 +0200 Subject: classes/BowelyzerGUI.sc: Implementing channel selector as EZPopUpMenu. Providing complete BowelyzerConfig instance on BowelyzerGUI init, to also get access to configFilePath for display. Refactoring action of 'save as' Button into separate function for easier access, when no configuration file is setup yet. classes/Bowelyzer.sc: Initializing BowelyzerGUI with complete BowelyzerConfig instance. Calling 'save as' if there is no configuration file setup yet. --- classes/Bowelyzer.sc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'classes/Bowelyzer.sc') diff --git a/classes/Bowelyzer.sc b/classes/Bowelyzer.sc index db6913d..3a61618 100644 --- a/classes/Bowelyzer.sc +++ b/classes/Bowelyzer.sc @@ -22,7 +22,7 @@ Bowelyzer{ server.waitForBoot({ hub = BowelyzerOSCHub.new(config.config); analyzer = BowelyzerAnalyzer.new(config.config); - gui = BowelyzerGUI.new(config.config); + gui = BowelyzerGUI.new(config); this.addGUIListeners; this.addServerListeners; }, @@ -179,7 +179,13 @@ Bowelyzer{ func: {|msg, time, addr, recvPort| var path = msg[1]; postln("Received: "++msg); - config.writeConfigurationFile; + if(config.configFilePath.isNil || config.configFilePath == "",{ + { + gui.saveAsAction(nil); + }.defer; + },{ + config.writeConfigurationFile; + }); }, path: "/save", srcID: hub.local -- cgit v1.2.3-54-g00ecf