[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] more switch trouble
hallo,
i had another strange problem with switch, something like this:
{ arg value;
switch( value,
1, { ... },
2, { .... },
...
);
}
i took me hours to find a bug which was that none of the switch statements were executed though the value had a valid value. i changed to
{ arg value;
if( value == 1, { ... },
{ if( value == 2, { ... },
...
)});
}
and everything was fine! i can look up the original code if that's important, but it was nothing special, it was a callback function for a SCButton
ciao, -sciss-