--- On Tue, 7/27/10, Mathieu Bouchard <ma...@artengine.ca> wrote: > From: Mathieu Bouchard <ma...@artengine.ca> > Subject: Re: [PD] Auto unique number tagging of gui objects > To: "saint" <sainti...@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 > _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list