billv wrote:Thanks tulamide. Tried that and finally got the result I'm after.
Cool! The results will be interesting (like your painting canvas).
billv wrote:Yeh, I took a look last week.....and got lost in the "depth" of all the info provided...
I still need to take time to learn it step by step...
Do you think I provided too much information when describing the methods, or do I presume too much? My goal was to provide it in a way that those already tried using Ruby are experienced enough to follow the descriptions. Maybe I demand too much?
billv wrote:Does that mean i could write the "accurate mouse capture" into the Spline Class, so
i can just forget about adding everywhere..?
or should that be "Mouse" class...

(noob class confusion)
Not neccessarily. The thing with classes is this: You can access any class by another class, as long as the first one is defined before accessing it. You can extend any class even after its initial definition. And you can access a class from any ruby edit instance (in other words, the Ruby editor also is just another class), as long as that class is defined before accessing it. For the latter you just need to make sure that the Ruby editor code containing the class definition is interpreted before the Ruby editor that makes use of the class. Flowstone reads layer by layer, following the creation time of each element within a layer. So, if you insert a Ruby editor in your schematic followed by a insertion of a knob, the Ruby editor will be interpreted first. Now, if you want it to be interpreted last, you could either cut and paste it, or put it in a module, because you create the module now, after the knob, so all of its content is also interpreted after the knob.
Having said that, the easiest way would indeed by to create a class holding all methods for calculating the delta movement, and then just call that methods within the usual mouse up, down and captured methods.
To answer the initial question: Yes, it would also be possible to write those methods into the spline class, but it would be better maintainable if they reside in their own class structure.
billv wrote:Ideally I'd like to "bury" this "accurate mouse capture" code so i could just start any
ruby mouse capture like normal ..
def mousemovecaptured x,y
end
..and go from there....
If you mean finding a way to later just call mouseMoveCaptured and the interpolation calculation is done automatically, that's not possible. But you could do what's described above.