--- On Tue, 7/27/10, Mathieu Bouchard matju@artengine.ca wrote:
From: Mathieu Bouchard matju@artengine.ca Subject: Re: [PD] Auto unique number tagging of gui objects To: "saint" saintidle@yahoo.com Cc: "pd list" pd-list@iem.at Date: Tuesday, July 27, 2010, 10:57 PM On Tue, 27 Jul 2010, saint wrote:
I was thinking of wrapper abstractions
You can make an abstraction that pretends to just instantiate another abstraction, but instead loads it object-per-object and edits the patch while loading it. I haven't tried yet but I'm sure that it's doable.
You'd be doing things like [route hradio] to find the horizontal radiobuttons so that you would be replacing the $6 of its argument list. (This is after splitting the message so that "#X obj" and the x,y position are separated from the rest (considered as an anything-message).
Or else you can keep everything together and check that the $5 of the list equals "hradio" and if so you would be replacing $11.
You need to make a certain number of cases because the receive-symbol isn't always in the same position in the argument-list.
If I remember correctly, the send/receive symbols are always the first and second symbol-atom arguments in the list of arguments and are always preceded by float arguments (exception: [vu]). So you could do a [list-drip], route and replace the send/receive symbols, let pass the third symbolic argument (the label), and collect all the args with a [list prepend] to be put back together with the relevant "#X obj x y" part of the line. It would save having to check each iemgui for the arg placement, which isn't listed in the help patches (though I've added that info in my revisions of the help docs).
-Jonathan
Anyway, you don't need any Python or Tcl to do that. Although I sometimes write Tcl programmes that read, write or modify Pd patches).
_____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801 -----Inline Attachment Follows-----
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Tue, 27 Jul 2010, Jonathan Wilkes wrote:
If I remember correctly, the send/receive symbols are always the first and second symbol-atom arguments
the send/receive "symbols" can actually be floats as well... in iemgui, not the ordinary floatbox nor the symbolbox.
It would save having to check each iemgui for the arg placement, which isn't listed in the help patches
It's not such a big deal.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
--- On Wed, 7/28/10, Mathieu Bouchard matju@artengine.ca wrote:
From: Mathieu Bouchard matju@artengine.ca Subject: Re: [PD] Auto unique number tagging of gui objects To: "Jonathan Wilkes" jancsika@yahoo.com Cc: pd-list@iem.at Date: Wednesday, July 28, 2010, 4:09 PM On Tue, 27 Jul 2010, Jonathan Wilkes wrote:
If I remember correctly, the send/receive symbols are
always the first and second symbol-atom arguments
the send/receive "symbols" can actually be floats as well... in iemgui, not the ordinary floatbox nor the symbolbox.
Ah, so that wouldn't be guaranteed to work. I was thinking s/r name floats would break the iemgui, but I was confusing it with dynamically changing the s/r name or label to something with spaces in it. However, using floats for the s/r name means you can no longer use [r] with those iemguis and that you have to use [makefilename %d] with [s] (or a message box). It may not be a big deal in this case, but it's worth keeping in mind.
It would save having to check each iemgui for the arg
placement, which isn't listed in the help patches
It's not such a big deal.
No, but since the # of creation args and their meaning isn't documented in
the help patches it makes more work for the user. That's why I added
that info. (It's currently in my_cnv-help.pd but not the other help
patches.)
_____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801