[PD-dev] Window strange behavior

Patrice Colet colet.patrice at free.fr
Wed Oct 9 14:52:44 CEST 2013


Hello,

I'm wondering if this strange behavior come from the <%sButtonPress> event, but I didn't try to compile for trying with my PC...
I use [sys_gui] for running GUI drawing commands, then there is no need for compile, it's like IOannnes's suggest but without binary compilation, and without all the sys_vgui() semantic...
May be if you drop a log file with a redirection command like this:

pd -open patch.pd 2>&1 >> tmp/patch.log

It might be possible to find what's happening with tcl.

Colet Patrice

----- Mail original -----
> De: "Pierre Guillot" <guillotpierre6 at gmail.com>
> À: pd-dev at iem.at
> Envoyé: Lundi 7 Octobre 2013 21:53:26
> Objet: [PD-dev] Window strange behavior
> 
> 
> 
> Hi,
> I've got a strange behavior in my patch with my GUI externals.
> 
> 
> First, I create a canvas :
> 
> sys_vgui("canvas %s -borderwidth 0 -width %d -height %d \n",
> x->e_drawing_id->s_name, (int)x->e_rect.width,
> (int)x->e_rect.height);
> 
> Then I bind the mouse to the canvas :
> 
> sys_vgui("bind %s <%sButtonPress> {+pdsend {%s mousedown %%x %%y
> %i}}\n", x->e_drawing_id->s_name, modifiers_list[i],
> x->e_name_rcv->s_name, i);
> 
> Then I create a window with the canvas :
> 
> sys_vgui("%s create window %d %d -anchor nw -window %s -tags %s
> -width %d -height %d\n", x->e_canvas_id->s_name,
> (int)x->e_obj.te_xpix + 4, (int)x->e_obj.te_ypix+ 4,
> x->e_drawing_id->s_name, x->e_window_id->s_name,
> (int)x->e_rect.width - 8, (int)x->e_rect.height - 8);
> 
> When I open a patch with the object, everything works fine (my object
> and the patch). But when I reduce the patch and "reopen" it, Pure
> data have a strange behavior : I can't change the edit mode (with
> crtl + e) anymore until I open a new patch. It seems like the patch
> or the mouse are no more linked. I can't figure out what append...
> 
> 
> 
> 
> here the link to file :
> 
> https://github.com/pierreguillot/PdEnhanced/blob/master/Sources/ebox/ebox_window.c
> 
> 
> and to the object (hoa.space) :
> 
> https://github.com/CICM/HoaLibrary/tree/master/PureData/builds
> 
> 
> If anybody can help me or have an idea, I'll be so grateful. Thanks
> in advance for any help.
> 
> Best,
> 
> 
> 
> 
> Pierre
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
> 



More information about the Pd-dev mailing list