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

Editing RubyEdit class

For general discussion related FlowStone

Re: Editing RubyEdit class

Postby Nubeat7 » Sat Aug 23, 2014 7:30 am

great Myco, thanks, thats a much smarter way to do it, never heard of aliasing methodes, if i understand this right it creates a new defined methode which is always called when the original one gets called?
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Editing RubyEdit class

Postby Exo » Tue Aug 26, 2014 7:07 pm

MyCo wrote:You can do that a lot easier, without having to modify the system.fsm. See attached file... just copy the blue module at the top into the schematic where you want to use that feature. Or just open that Schematic once and edit another file (all schematics in the same FlowStone instance get modified)


Nice solution MyCo, thanks.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
 
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK

Re: Editing RubyEdit class

Postby trogluddite » Tue Aug 26, 2014 8:18 pm

Nubeat7 wrote:aliasing methodes, if i understand this right it creates a new defined methode

Haven't seen MyCo's code, but I would guess that you're exactly right.
Aliasing a method just creates an exact copy of the original with a new name. IMHO "alias" isn't a very good name for it - it's not just letting you use a "pet name" for something, it really does make a whole new method by copying the original, even for methods coded in C++ that you can't access the source code for.

That leaves you free to re-define the original method, but still have access to the old code by using its new name. It's a common technique in Ruby for "monkey patching" - where you want to alter what a method does, but need to be careful not to break any of the original behaviour. Aliasing lets you do that relatively safely without having to know exactly how the original code works.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Editing RubyEdit class

Postby RJHollins » Tue Aug 26, 2014 9:30 pm

Aliasing lets you do that relatively safely without having to know exactly how the original code works.


gee ... that pretty much sums up my work in FS :shock:

:lol:
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 61 guests