Support

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] Intercommunication

Post any examples or modules that you want to share here

Re: [Ruby] Intercommunication

Postby tulamide » Wed May 18, 2016 11:57 am

Tronic wrote:I want to also share this thing (a little magic?):

if you create a module and give it a name:
___SYSTEM___
it will work to the ruby interpreter level (main),
if you try to write the self function in a ruby module,
you'll see that it will not give you a RubyEdit instance,
but it will result in the 'main instance of the ruby interpreter',

then, in it add all your modules, classes, and codes that you want them declared before all things,
this solves the stress of adding new things to the whole Ruby Flowstone System
without having to take account of the order of creation of RubyEdit module,

so in short, everything that contains this module will always be loaded before anything else.

try it, and then tell me.

Finally had time to check it out.

module ___SYSTEM___
end

produces "class/module name must be CONSTANT" error
I assume you have a full Ruby install, maybe with $PATH variables set?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2692
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: [Ruby] Intercommunication

Postby Tronic » Thu May 19, 2016 7:01 am

I mean a primitive "module", and not a ruby module ...
I have not correctly specified it, my text, sorry :oops:

Edit: so an primitive Module with the Caption text:
___SYSTEM___

I have added this the correction in the preview post.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Previous

Return to User Examples

Who is online

Users browsing this forum: No registered users and 11 guests

cron