Re: Radio buttons under preset manager
Posted: Sun Aug 18, 2013 6:10 pm
thanks for the encouraging words, billv
The last 6 months since I started with SM, and then the recent transition to FS has been very interesting. I was intriqued by the 'circuit board' [schematic] concept. Adding RUBY to FS has now expanded the Universe.
Although I still struggle to hit the '#" and often times hit the '@' key instead
As I played with with the Radio button by changing to Case...Select, I found that I can further reduce the coding.
For each of the 'WHEN' statements, we don't [seem] to need the 'i=' part.
We can simplify to
So the new code can be:
This [probably] has zero influence on code efficiency or optimization ... but it can sometimes be easier to type and read.
Fun stuff ! Thanks
The last 6 months since I started with SM, and then the recent transition to FS has been very interesting. I was intriqued by the 'circuit board' [schematic] concept. Adding RUBY to FS has now expanded the Universe.
Although I still struggle to hit the '#" and often times hit the '@' key instead
As I played with with the Radio button by changing to Case...Select, I found that I can further reduce the coding.
For each of the 'WHEN' statements, we don't [seem] to need the 'i=' part.
Code: Select all
when i=4 We can simplify to
Code: Select all
when 4So the new code can be:
Code: Select all
def event i,v
case i
when 0
output 0,0
when 1
output 0,1
when 2
output 0,2
when 3
output 0,3
when 4
output 0,4
when 5
output 0,5
when 6
output 0,6
when 7
output 0,7
when 8
output 0,8
end
end
This [probably] has zero influence on code efficiency or optimization ... but it can sometimes be easier to type and read.
Fun stuff ! Thanks