Page 2 of 2

Re: New simple GUI, Help needed:RUBY

PostPosted: Wed Jul 12, 2017 5:38 pm
by pshannon
Spogg wrote:You can try to copy and paste code from the 3.09 via Notepad into the code boxes in 3.081. I do know this works with DSP code at least, but not sure about Ruby.

Cheers

Spogg


Thanks Spogg,

I did that and I even rewrote. I can't even do this simple addition now.

xvalue = xvalue + 1
or
xvalue += 1

I get this: nomethoderror: undefined method '+' #<thread blah blah dead

Why would you need to define '+' ???

The ruby interpreter sometimes kills me too. I keep thinking there are bugs in this ruby parser/interpreter. Sometimes I have to retype the exact same thing, maybe I need to put a space between something for it to work or try different approaches. But in the end the logic and the syntax is textbook in many cases. Thanks

Frustrated QuadBIT.

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 12:10 am
by pshannon
Here are the updated version using FS 3_0_8_1 - hope this solves it. I had all kind of ruby issues and component module issues downgrading from the crappy beta. I spent 10 minutes on this originally and now several hours for something so simple! Let me if this is what you wanted. I put a min/max value in there too. The really sucky part for me? I built a lot of logic modules and it is not about copy and pasting code.

QuadBIT

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 12:28 am
by tulamide
pshannon wrote:
Spogg wrote:You can try to copy and paste code from the 3.09 via Notepad into the code boxes in 3.081. I do know this works with DSP code at least, but not sure about Ruby.

Cheers

Spogg


Thanks Spogg,

I did that and I even rewrote. I can't even do this simple addition now.

xvalue = xvalue + 1
or
xvalue += 1

I get this: nomethoderror: undefined method '+' #<thread blah blah dead

Why would you need to define '+' ???

The ruby interpreter sometimes kills me too. I keep thinking there are bugs in this ruby parser/interpreter. Sometimes I have to retype the exact same thing, maybe I need to put a space between something for it to work or try different approaches. But in the end the logic and the syntax is textbook in many cases. Thanks

Frustrated QuadBIT.

Starting with knowledge that might be of interest: Ruby is fully OOP. Everything in Ruby is an object. That includes numbers, operators and even conditionals like "if".
Code: Select all
a = a + 1 # this is actually calling the method "+" of the number a, like this: a.+(1)
a += 1 # same as above

So the message tells you that there is no method "+" for a number. Since this is Ruby's kernel, it means that it can't find a proper Ruby installation at the path it's looking for. This happens a lot, when up- or downgrading without taking care.

My proposal is a clean install. First delete 3.0.9 and all of its dependencies. That means, after de-installing 3.0.9, open the filebrowser and in the path field enter just "%appdata% and hit return. If you see the folder "Flowstone" at this location (or anything that has to do with Flowstone), delete it.

Run a registry cleaner to delete all links to Flowstone.

Now you can install 3.0.8.1, and should be able to work normal again.

CAUTION: The folder "Flowstone" contains a subfolder "modules", where all modules are saved as osm, incl. those that don't belong to the standard install. You might want to backup that folder, but when copying data make sure you only copy those modules that you installed yourself (by dragging anything from a schematic to the sidebar in Flowstone). Don't replace the modules from the fresh 3.0.8.1 installation!

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 12:38 am
by pshannon
tulamide wrote:
pshannon wrote:
Spogg wrote:You can try to copy and paste code from the 3.09 via Notepad into the code boxes in 3.081. I do know this works with DSP code at least, but not sure about Ruby.

Cheers

Spogg


Thanks Spogg,

I did that and I even rewrote. I can't even do this simple addition now.

xvalue = xvalue + 1
or
xvalue += 1

I get this: nomethoderror: undefined method '+' #<thread blah blah dead

Why would you need to define '+' ???

The ruby interpreter sometimes kills me too. I keep thinking there are bugs in this ruby parser/interpreter. Sometimes I have to retype the exact same thing, maybe I need to put a space between something for it to work or try different approaches. But in the end the logic and the syntax is textbook in many cases. Thanks

Frustrated QuadBIT.

Starting with knowledge that might be of interest: Ruby is fully OOP. Everything in Ruby is an object. That includes numbers, operators and even conditionals like "if".
Code: Select all
a = a + 1 # this is actually calling the method "+" of the number a, like this: a.+(1)
a += 1 # same as above

So the message tells you that there is no method "+" for a number. Since this is Ruby's kernel, it means that it can't find a proper Ruby installation at the path it's looking for. This happens a lot, when up- or downgrading without taking care.

My proposal is a clean install. First delete 3.0.9 and all of its dependencies. That means, after de-installing 3.0.9, open the filebrowser and in the path field enter just "%appdata% and hit return. If you see the folder "Flowstone" at this location (or anything that has to do with Flowstone), delete it.

Run a registry cleaner to delete all links to Flowstone.

Now you can install 3.0.8.1, and should be able to work normal again.

CAUTION: The folder "Flowstone" contains a subfolder "modules", where all modules are saved as osm, incl. those that don't belong to the standard install. You might want to backup that folder, but when copying data make sure you only copy those modules that you installed yourself (by dragging anything from a schematic to the sidebar in Flowstone). Don't replace the modules from the fresh 3.0.8.1 installation!

-------------------------------------------------------------------------------------------------------
Thanks for the info, I just got it working. But all my custom modules will not load in the skylark version. I know I was stupid to use the beta, but I can't even copy and paste between instances of FS it is like they don't see the clipboard. I am now able to get both versions running at the same time in two different windows. I uploaded the latest version that should work for mandana. I just hope there is a trick to enable import or something. I used standard modules to create of some of my stuff.

Regards

QuadBIT

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 7:13 am
by Spogg
pshannon wrote:... I can't even copy and paste between instances of FS it is like they don't see the clipboard. I am now able to get both versions running at the same time in two different windows. I uploaded the latest version that should work for mandana. I just hope there is a trick to enable import or something...

QuadBIT


I can confirm that you can't copy between 2 instances of Flowstone; I tried it once! I assume FS doesn't share its clipboard.

Also there is no method to import modules, so if for example I want you to have anything in my toolbox it has to go into a schematic and you add it to your toolbox from there. It would be nice to have this so you could add it to my Wishlist Topic:
viewtopic.php?f=2&t=3597&hilit=wishlist

Something else vaguely related is if you have 2 or more projects open (in one instance) only one can use the audio port (ASIO). If you do cntrl-Tab to switch between them, and want to listen to more than one schematic, you have to enable ONLY the one you you want to hear in the audio interface prim. If you don't do this you'll need to turn the interface prim off and on again to capture the stream.

Cheers

Spogg

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 7:51 am
by martinvicanek
You can open FS beta then copy all your code (stream, ASM, Ruby) to an external editor.
Then close FS beta, open FS and c&p form the editor.
That way you can at least save the code. Unfortunately not the connections, green stuff, etc.

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 3:14 pm
by tulamide
Spogg wrote:Something else vaguely related is if you have 2 or more projects open (in one instance) only one can use the audio port (ASIO).

That's a characteristic of ASIO/ASIO4ALL. Exclusive access is key to the low latency it provides. The only thing Flowstone could do would be to de-activate ASIO when a schematic is in background and re-activate when back to foreground (that's how DAWs do it on the system layer, when a certain option is set). However, this comes with a backdrop: Schematics (at least their stream, dsp code and asm parts) would need to be re-initialized each time, ASIO gets activated again.

Re: New simple GUI, Help needed:RUBY

PostPosted: Thu Jul 13, 2017 4:44 pm
by Spogg
Thanks tulamide.

So it would seem this is not a limitation of FS that could be "fixed". Worth knowing!

Cheers

Spogg

Re: New simple GUI, Help needed:RUBY

PostPosted: Fri Jul 14, 2017 8:32 pm
by pshannon
Mandana,

Looks like only one person downloaded this fix. It might have gotten lost in all of the dialong, not sure, but here is a link to it again.

download/file.php?id=7139

Re: New simple GUI, Help needed:RUBY

PostPosted: Wed Aug 16, 2017 3:42 am
by MANDANA
Thank you for spending your time and effort to fix my module, you did an excellent job and that is exactly what I wanted. :D
I wanted this module to be made not only for myself but for the whole Flowstone community. I hope the next version of Flowstone comes out before 2018.