Permalink
Browse files

ServerOptionsGui: fix options type

  • Loading branch information...
1 parent ee3bc7d commit 64d5c2432ccfb7e0365e79f67886d9da3a872b91 @gusano committed Jun 25, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 utils/ServerOptionsGui.sc
View
11 utils/ServerOptionsGui.sc
@@ -280,11 +280,12 @@ ServerOptionsGui {
setServerOption { |options, key, type|
var value;
- if (type == PopUpMenu, {
- value = currentValues[key].item.asString
- }, {
- value = currentValues[key].value
- });
+ switch (type,
+ PopUpMenu, { value = currentValues[key].item.asString },
+ NumberBox, { value = currentValues[key].value.asInteger },
+ TextField, { value = currentValues[key].value.asString },
+ CheckBox, { value = currentValues[key].value.asBoolean }
+ );
options.tryPerform(key.asSetter, value);
if (verbose, {
" - changed: % -> %".format(key, value).postln; "";

0 comments on commit 64d5c24

Please sign in to comment.