If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Ruby Reset Needed
2 posts
• Page 1 of 1
Ruby Reset Needed
I can't be the only one tired of having to deal with ruby code blocks getting into bad states even when the code itself is correct. The persistence of values within the Ruby component causes all sorts of mucky stuff mid-development. There needs to be some easy way of resetting the state of the Ruby component and starting it up fresh. Is there a way to do this I don't know about or is this perhaps something we can petition the devs for? I know sometimes just clicking on the input nodes and then turning it off and on again is enough, but when your schematic just randomly stops working sometimes it can be hard to dig up some random Ruby block that blew a fuse on you.
In general I find managing the persistent values in Ruby to be a pain in the butt. Maybe I should get into the habit of switching it off as I'm editing the code, if that helps. But that can't help external forces causing errors on the inputs.
It also probably wouldn't hurt if there was some top-level Ruby error reporting put into the Flowstone interface, so if you have a block somewhere throwing an error it will actually show you there's an error without you having to go and dig up that specific code block and look at it to see it.
In general I find managing the persistent values in Ruby to be a pain in the butt. Maybe I should get into the habit of switching it off as I'm editing the code, if that helps. But that can't help external forces causing errors on the inputs.
It also probably wouldn't hurt if there was some top-level Ruby error reporting put into the Flowstone interface, so if you have a block somewhere throwing an error it will actually show you there's an error without you having to go and dig up that specific code block and look at it to see it.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Ruby Reset Needed
What do you mean by persistance values? Instance variables?
If Ruby code gets into bad state, there is an issue for sure. Even if you think your code is correct. You should share that code, when there's issues. 4 eyes or 6 or 8 or... see more than 2.
Also, you are free to set up a method that sets all your "persistent values" to nil or their start values. That is the equivalent of resetting. You just call that method whenever you need it. Normally though, this would never be needed.
If Ruby code gets into bad state, there is an issue for sure. Even if you think your code is correct. You should share that code, when there's issues. 4 eyes or 6 or 8 or... see more than 2.
Also, you are free to set up a method that sets all your "persistent values" to nil or their start values. That is the equivalent of resetting. You just call that method whenever you need it. Normally though, this would never be needed.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 44 guests