Re: [PD] Getting pointer coords in patcher windows

2016-12-09 Thread IOhannes m zmölnig
On 12/10/2016 06:34 AM, Derek Kwan wrote:
> Are there
> issues with freeing the proxy directly with the parent's free method?

well, otherwise it will crash when you send a "clear" message to the
canvas (which will be received by [receivecanvas] that was just deleted).
the entire receiver-proxy is a workaround to allow elements to be
removed from the linked list of receivers while it is being executed.

gfmdsar
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Getting pointer coords in patcher windows

2016-12-09 Thread Derek Kwan
> On 12/09/2016 06:24 AM, Derek Kwan wrote:
> > Hello,
> > 
> > external object class was instantiated. The latter sounds trickier and I
> > haven't got there yet, but for the former I'm trying [winfo pointerx
> > $::focused_window] 
> 
> check out iemgut's [canvasreceive].
> check out the pdtk_canvas_motion{} func, which does all the messaging of
> mouse-pointer coords from gui to core.
> 
> gfmasrd
> IOhannes

Thanks! I'm looking over [canvasreceive]'s code right now. I'm curious,
what's the point of the clock member of the proxy? I notice that
basically its only job is to call the proxy's free method when the
clock's delay gets set to 0 via the parent's free method. Are there
issues with freeing the proxy directly with the parent's free method?

Derek

-- 
Derek Kwan
www.derekxkwan.com

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Getting pointer coords in patcher windows

2016-12-09 Thread IOhannes m zmölnig
On 12/09/2016 06:24 AM, Derek Kwan wrote:
> Hello,
> 
> external object class was instantiated. The latter sounds trickier and I
> haven't got there yet, but for the former I'm trying [winfo pointerx
> $::focused_window] 

check out iemgut's [canvasreceive].
check out the pdtk_canvas_motion{} func, which does all the messaging of
mouse-pointer coords from gui to core.

gfmasrd
IOhannes






signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] Getting pointer coords in patcher windows

2016-12-08 Thread Derek Kwan
Hello,

Apologies in advance, bit new to Tcl/Tk, but I'm trying to get the
pointer coordinates of the mouse for an external (yes, Cyclone) via Tcl
for both the currently active patcher window and the window in which the
external object class was instantiated. The latter sounds trickier and I
haven't got there yet, but for the former I'm trying [winfo pointerx
$::focused_window] and it seems to just be spitting out screen coords.
I've tested out [winfo rootx $::focused_window] and that seems to be
sptting the proper top-left coords of the focused window so what am I
doing wrong? I suppose if nothing else works, I can just subtract the
rootx/y values from the screen values I'm getting and clip them to the
window's dimensions. If it helps, I'm testing in Ubuntu. Thanks in
advance!

Derek

-- 
Derek Kwan
www.derekxkwan.com

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list