[PD] [PD-announce] completion-plugin new version
matju at artengine.ca
Sat May 21 23:46:17 CEST 2011
On Sun, 15 May 2011, yvan volochine wrote:
> On 05/14/2011 08:19 PM, João Pais wrote:
>> that's great. don't know if you want to, but I would suggest to copy
>> another useful max feature: when you click on a send or receive object
>> (the same for their audio versions), a pop-up comes up listing how many
>> other objects exist using the same variable, and by clicking in any of
>> these objects it takes you to the patch where they are.
> AFAICS this is currently not possible because most of the gui is still handle
> by pd (instead of tcl), therefore sub-patches are not accessible, etc..
You need to modify the 'find' method in the canvas class. You make one
version that doesn't auto-select an item, but instead sends a list of all
matches to the tcl side for your use. But this would only find those that
are textually the same. It will not find [r $1-poil] and [r patate-poil]
to be the same even though $0=patate in the first case. It may also claim
that another [r $1-poil] is the same as the first [r $1-poil] although
they have a different content of $1.
There is a table of all receive-symbols by actual symbol (not textual
symbol). You use gensym() on the text, it gives a t_symbol*, you lookup
s_thing, it gives you a t_pd*. You check whether it's a t_bindlist*. If
it's not, you have 1 (or 0) receivers. Else, you walk the bindlist and
collect all receivers. But there is not a similar list of actual senders.
So, to get a list of senders, you need to do dollar-expansion on the
contents of all [s] boxes during the search !
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
More information about the Pd-list