Page 1 of 1

This is a rant ... at least my idea of it

Posted: Fri May 29, 2015 11:02 pm
by tulamide
Dear community,

there is one thing with Flowstone that makes me angry. It's annoying, it's totally unneccessary, it stops me from progress whenever I stumble upon it (and that's very often), because I then try to find a solution. Without convincing success.

I'm talking about Flowstone not reporting a mouse up event, if this mouse up happens outside of the view, where the mouse down happened. My current workaround is to place a RubyEdit in the top most view's module, sending each incoming mouse up event back to the lower layered modules, while those check on that incoming signal, if a mouse down didn't get a corresponding mouse up and then react.

But that's not very cool. For example, sharing controls would involve people having similar workarounds. Also, it could be done quite similar to my solution from Flowstone already (in compiled C it should be a lot faster than in Ruby). There might be better solutions. Etc.

I thought I found a solution with the hold state of the show cursor prim. But I just saw that it is only faking to hold the position. Instead it hides the cursor and stores the starting position, applying that position when the movement is done. The issue is that Flowstone still registers a mouse up at a position far away from the starting position - problem still not solved. Btw., it also stops when reaching the screen's border, although hidden and hold. Took me some time to see that it is not a bug in my algorithms :oops:

After days of work on the multi-functional control (complete re-write), I experienced the issue again and now am very frustrated. Will take a break from programming for a day or two and try to calm down. How annoying!

Re: This is a rant ... at least my idea of it

Posted: Sat May 30, 2015 12:01 am
by MyCo
I don't understand what you're talking about. When the mouse is captured eg. in Ruby using "captureMouse" on mouse down. The capturing control receives mouse up message even when the mouse up occures outside of FS. The corresponding event is called "mouseLUpCaptured". Have a look at the stock knobs.

Re: This is a rant ... at least my idea of it

Posted: Sat May 30, 2015 4:20 pm
by tulamide
MyCo wrote:I don't understand what you're talking about. When the mouse is captured eg. in Ruby using "captureMouse" on mouse down. The capturing control receives mouse up message even when the mouse up occures outside of FS. The corresponding event is called "mouseLUpCaptured". Have a look at the stock knobs.

Thanks for the reminder. But why are you saying it as if it were obvious? I once saw this method in the stock modules, but since it is totally undocumented and the manual explains a different way of handling mouse events, I sticked to the manual. That's why I now made an example showing the differences, so that people get aware of this method and use it instead of the one documented in the manual!

(Finally I can forget about this annoyance and concentrate on the real work! What a relief!)

Re: This is a rant ... at least my idea of it

Posted: Sat May 30, 2015 4:27 pm
by Nubeat7
you run into this trouble only with the mouseRUp methode because the mouseRUpCaptured methode doesn't exist ..

Re: This is a rant ... at least my idea of it

Posted: Sat May 30, 2015 9:53 pm
by MyCo
tulamide wrote:Thanks for the reminder. But why are you saying it as if it were obvious?


Sorry, thought it was obvious as all interactive stock modules use it. :mrgreen:
And yep, Nubeat is right. It doesn't work with any other mouse button, which is really stupid.

Re: This is a rant ... at least my idea of it

Posted: Sun May 31, 2015 1:10 am
by Perfect Human Interface
MyCo wrote:Sorry, thought it was obvious


There's a lot of this in Flowstone... :P Many gaps in documentation. Too bad there isn't still a Wiki being maintained (is there?).

Still you few guys who hang around here are tremendously helpful!