"Redrawing GUI" Open pages

For general discussion related FlowStone
Post Reply
Wassaka
Posts: 85
Joined: Wed Dec 30, 2015 3:41 am

"Redrawing GUI" Open pages

Post by Wassaka »

Hi! I am Wassaka and I am newbie in FlowStone. I want to put sections in my synth, like effects, osc, filter... etc, but I want to put them in the same place, and choose with Radio-buttons, the section. I tryed to do this but it doesn't work... Please, can you help me? Or pass me the schematic. Thanks and Happy New Year!!! :mrgreen: :mrgreen:
User avatar
kortezzzz
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: "Redrawing GUI" Open pages

Post by kortezzzz »

Hi and welcome.

Here is a very basic example using the radio buttons method. Hope it help.
Attachments
( Basic filter rack example).fsm
(215 KiB) Downloaded 918 times
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: "Redrawing GUI" Open pages

Post by RJHollins »

Thanks for posting this example. Interesting all the different ways this idea can be realized.

One issue :o

When I first loaded in the example schematic, got a RUBY error. Located in the 'radio buttons bill v concept' module.

To correct, I just had to turn OFF then ON the RUBY box ... but the question ... why the error? how to solve ?
'NoMethodError ... in method DRAW ... undefined method {} for nil:NilClass"
Wassaka
Posts: 85
Joined: Wed Dec 30, 2015 3:41 am

Re: "Redrawing GUI" Open pages

Post by Wassaka »

kortezzzz wrote:Hi and welcome.

Here is a very basic example using the radio buttons method. Hope it help.

Woow man, thanks you very much!!
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: "Redrawing GUI" Open pages

Post by billv »

RJHollins wrote:why the error? how to solve ?
'NoMethodError ... in method DRAW ... undefined method {} for nil:NilClass"


Notice RJ there are two arrays in the draw section that I didn't initialize properly.
Drop this into draw section
@points = 2 if @points == nil
@val = 0 if @val == nil

Will update those radio selectors one day.....
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: "Redrawing GUI" Open pages

Post by RJHollins »

Ah ... Thanks Billv ...

That fixed it.

.... and THANKS for sharing experience and examples to the FS community.

8-)
User avatar
kortezzzz
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: "Redrawing GUI" Open pages

Post by kortezzzz »

When I first loaded in the example schematic, got a RUBY error. Located in the 'radio buttons bill v concept' module.


Drop this into draw section
@points = 2 if @points == nil
@val = 0 if @val == nil


Oh, sorry, forgot to add "after load" and "after duplicate" modules into it's matching module. That's should work without billv's current fix as well. Uploaded the schematic.

@billv

I would like to try your fix but probably couldn't locate the "draw section", since I'm getting first start errors without
the "after" modules added. Can you please say on what line should we add your fix?
Attachments
( Basic filter rack example)fix.fsm
(215.02 KiB) Downloaded 845 times
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: "Redrawing GUI" Open pages

Post by billv »

kortezzzz wrote:forgot to add "after load" and "after duplicate

Yeh...i just noticed they were missing from the selector you posted first.
Definatly leave those in.
The "draw section" i refer to is the section of code that begins

Code: Select all

def draw v
'put code in here'

end
Post Reply