I would use #mouse to match the internal send names like #notein, etc. :) Actually, you can receive messages to [notein] using [r #notein] so I could imagine a similar set of mouse objects which work in the same manner ala [mouseup], [mousedown], [mousemove], & possibly [mousedrag]. We can look into the code on those objects and replicate how they work to avoid the missing receiver name.
Honestly, this should be something built in however I would first make sure there isn't any sort of major performance penalty (probably not). Chris's comment about "in 2019" is spot on... > On Mar 15, 2019, at 11:06 AM, [email protected] wrote: > > From: Jean-Yves Gratius <[email protected] <mailto:[email protected]>> > To: [email protected] <mailto:[email protected]> > Subject: Re: [PD] In 2019 is there a way to detect mouse down/up? > Message-ID: <[email protected] > <mailto:[email protected]>> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Not sure it can be considered as a vanilla solution, but you should edit > tcl/pdtk_canvas.tcl file and add one line in the proc > pdtk_canvas_mouseup (line 216) : > > proc pdtk_canvas_mouseup {tkcanvas x y b} { > set mytoplevel [winfo toplevel $tkcanvas] > pdsend "$mytoplevel mouseup [$tkcanvas canvasx $x] [$tkcanvas > canvasy $y] $b" > pdsend "MOUSE mouseup [$tkcanvas canvasx $x] [$tkcanvas canvasy $y] $b" > } > (see attachment) > > Then you'll always need to have a receiver (named "MOUSE") in your > patch, else you will receive error messages in pd console. > If you click on a bang object in your patch, you can then listen to the > MOUSE receiver and wait for the message "mouseup" -------- Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/>
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
