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

For general discussion related FlowStone
Post Reply
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

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

Post 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!
"There lies the dog buried" (German saying translated literally)
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

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

Post 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.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

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

Post 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!)
"There lies the dog buried" (German saying translated literally)
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

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

Post by Nubeat7 »

you run into this trouble only with the mouseRUp methode because the mouseRUpCaptured methode doesn't exist ..
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

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

Post 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.
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

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

Post 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!
Post Reply