From 94f11724534098ac0f08bb6d084d35979f673e5a Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 14 Jul 2016 13:19:07 +0200 Subject: classes/BowelyzerGUI.sc: Setting channel View names type String, too. classes/Bowelyzer.sc: Casting update type String, when checking for empty String on rename. --- classes/Bowelyzer.sc | 2 +- classes/BowelyzerGUI.sc | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/classes/Bowelyzer.sc b/classes/Bowelyzer.sc index cea4c55..1841cb7 100644 --- a/classes/Bowelyzer.sc +++ b/classes/Bowelyzer.sc @@ -63,7 +63,7 @@ Bowelyzer{ switch(type, \name,{ // if the name is not empty and not used, change to it - if((update != "") && config.config.at(\inputs).includesKey(update).not, { + if((update.asString != "") && config.config.at(\inputs).includesKey(update).not, { //move the controls config.config.at(\controls).put(update.asSymbol, config.config.at(\controls).at(name)); config.config.at(\controls).removeAt(name.asSymbol); diff --git a/classes/BowelyzerGUI.sc b/classes/BowelyzerGUI.sc index 862d999..fd20cab 100644 --- a/classes/BowelyzerGUI.sc +++ b/classes/BowelyzerGUI.sc @@ -332,7 +332,7 @@ BowelyzerGUI{ // adding name textfield of input headView = View(channelView.asView, Rect(0, 0, headViewWidth, headViewHeight)); headView.asView.background = Color.fromHexString("#DDEFDD"); - headView.name = \inputs; + headView.name = "inputs"; headView.layout = HLayout(); headView.layout.spacing = 4; headView.layout.margins = [4,0,4,0]; @@ -349,7 +349,7 @@ BowelyzerGUI{ controlMeterContainerView = View(channelView.asView, Rect(0, 0, controlMeterContainerViewWidth, controlMeterContainerViewHeight)); controlMeterContainerView.asView.background = Color.fromHexString("#DDDDEF"); - controlMeterContainerView.name = \meterAndControls; + controlMeterContainerView.name = "meterAndControls"; controlMeterContainerView.layout = HLayout(); controlMeterContainerView.layout.spacing = 0; controlMeterContainerView.layout.margins = [0,0,0,0]; @@ -374,18 +374,16 @@ BowelyzerGUI{ controlsView = View(controlMeterContainerView.asView, Rect(0,0, controlsViewWidth, controlsViewHeight)); controlsView.asView.background = Color.fromHexString("#EEEFEE"); - controlsView.name = \controls; + controlsView.name = "controls"; controlsView.layout = VLayout(); controlsView.layout.spacing = 0; controlsView.layout.margins = [2,0,2,0]; //TODO: add ranger for amplitude and pitch threshold/region //TODO: rearrange sliders/rangers/knobs in groups (maybe even tabs) - //Routine{ config.at(\controls).at(name).order.do({|control, i| var value = config.at(\controls).at(name).at(control), controlIs = BowelyzerConfig.controlContainedIn(control); - //(0.1).wait; switch( controlIs.asSymbol, \knob, {this.setupEZKnob(controlsView, control, value, \controls, name).view.children.do({|item| if(item.isKindOf(NumberBox),{item.align_(\right)})})}, @@ -393,7 +391,6 @@ BowelyzerGUI{ \ranger, {this.setupEZRanger(controlsView, control, value, \controls, name).view.children.do({|item| if(item.isKindOf(NumberBox),{item.align_(\right)})})} ); }); - //}.play(AppClock); // add channelView to the container and the global Dictionary for better access channelContainerView.layout.add(channelView); channels.add(channelView); -- cgit v1.2.3-54-g00ecf