[PD-dev] dynamic patching, cut w/out vis 1?

Hans-Christoph Steiner hans at eds.org
Thu Mar 25 01:36:00 CET 2004


On Monday, Mar 22, 2004, at 14:14 America/New_York, Michal Seta wrote:

> "B. Bogart" <ben at ekran.org> writes:
>
>> [ click  5 5 0 0 (
>>
>> results in:
>>
>> error: Bad arguments for message 'click' to object 'canvas'
>
> I've seen that problem, I think it used to work correctly in pd.035 or
> 0.36.  The best way is to use find message.

I am pretty sure that the [click( message was renamed to [mouse( in pd 
0.37 or so.  It seems to have the same arguments, but I haven't read 
the code.  I also would love to have a way to address objects by their 
number.  It would help a ton with the patch I am working on now.

.hc

>
>>
>> Any ideas? an example patch would be ideal.
>
> An example follows.  Inside the subpatcher [pd abs] is an object
> [metro 1000] and with the message find metro, cut, obj 110 116 metro
> 3000 I recreate a [metro 3000].  Obviously, this isn't a great example
> (who would want to to that just to change an arg ...) but it was the
> first think that crossed my mind...
>
> Note, that the 'find' message opens the subpatch/abstraction
> containing the object you search for.  I don't know how to avoid
> that...  The only way I found so far is placing the window out of
> bounds.  Then, you don't see it opening and closing.  This generates
> a message such as this
>
> invalid command name ".x83285e0.m.edit"
>
> in my Pd console (devel_0_37 cvs) but seems to
> be working (see this line: #N canvas 606 499 11450 11300 abs 0;)
>                                          ^^^^^^^^^^^
> I, too, would be interested to know if there is a better way.
>
> ---------------- cut here -----------------------------------
> #N canvas 304 544 450 300 10;
> #N canvas 606 499 11450 11300 abs 0;
> #X obj 115 64 inlet;
> #X obj 114 216 outlet;
> #X obj 110 116 metro 1000;
> #X connect 0 0 2 0;
> #X connect 2 0 1 0;
> #X restore 197 157 pd abs;
> #X msg 14 38 \; pd-abs editmode 1 \, find metro \, cut \, obj 110 116
> metro 3000 \, connect 0 0 2 0 \, connect 2 0 1 0 \, editmode 0 \, vis
> 0;
> --------------- cut -----------------------------------------
> -- 
> 	      _
>       __  __ (_)___   Michal Seta
>      / 	\/  \ _/^ _|
>     /  	     V |_  \ @creazone.32k.org
>    (___/V\___|_|___/
> http://www.[creazone]|[noonereceiving].32k.org
>
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-dev





More information about the Pd-dev mailing list