mouseLUpCaptured and why you should use it

Post any examples or modules that you want to share here
Post Reply
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

mouseLUpCaptured and why you should use it

Post by tulamide »

For those new to RubyEdit:

I made an example showing the difference between the RubyEdit methods "mouseLUp" and "mouseLUpCaptured". You will see that there is practically no reason to use the former.

Thanks, MyCo, for the reminder!
Attachments
mouseLUpCaptured.fsm
(1.92 KiB) Downloaded 1198 times
"There lies the dog buried" (German saying translated literally)
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: mouseLUpCaptured and why you should use it

Post by KG_is_back »

Yeah, it took me a while till I've discovered this myself... We should make a complete list of things missing in the manual and send it to malc to add them...
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: mouseLUpCaptured and why you should use it

Post by MyCo »

When you haven't heard about "mouseLUpCaptured", you might not know that one either:

Code: Select all

def viewSize(x,y,w,h)
...
end


It is triggered, when the module GUI Size changes.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: mouseLUpCaptured and why you should use it

Post by tulamide »

MyCo wrote:When you haven't heard about "mouseLUpCaptured", you might not know that one either:

Code: Select all

def viewSize(x,y,w,h)
...
end


It is triggered, when the module GUI Size changes.

Thanks a lot! How come that such important and convenient methods are not even mentioned in the manual? I understand that some lesser meaningful methods slip through, but those?

I discovered quite a lot undocumented methods (e.g. setARGB/getARGB for the Color class, caption, parent, etc.), but especially those two hide themselves very well. Even now that I know they exist, I still can't find them.
"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: mouseLUpCaptured and why you should use it

Post by MyCo »

tulamide wrote:How come that such important and convenient methods are not even mentioned in the manual? I understand that some lesser meaningful methods slip through, but those?


Yeah, I guess it just has been forgotten. Some of them are just not noteworthy though, because they are outdated or useless already :mrgreen: "viewSize" is one of them. You don't really need it, because when the GUI size changes, there is always a draw call right after that. You can just use the view argument in the drawcall to get the new size.

The missing documentation is not only related to Ruby code. In fact the most undocumented functions are in the DSP code... Just noticed that a couple of days back. There are at least 6 functions that I used before and they aren't in the documentation... I mean, even the "|" operator isn't in there :mrgreen:
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: mouseLUpCaptured and why you should use it

Post by tulamide »

MyCo wrote:You don't really need it, because when the GUI size changes, there is always a draw call right after that.

I thought of another use for this. I didn't test it yet, just took your word. But if it is triggered while resizing, it can be used to differentiate between normal redraws and redraws caused by a resizing view. A complex composed view might want to do an alternate drawing with reduced complexity while the view is resized, to reduce processor load.

The missing of proper documentation for dsp most probably didn't catch my attention because I'm already overchallenged with the things that are documented :lol:
"There lies the dog buried" (German saying translated literally)
Post Reply