canvas_find works well, thanks!
https://github.com/danomatika/PdParty/blob/master/src/modules/PureData.m#L60... https://github.com/danomatika/PdParty/blob/master/src/modules/PureData.m#L608
Dan Wilcox @danomatika https://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
On Jan 11, 2016, at 1:31 PM, pd-list-request@lists.iem.at wrote:
From: Jonathan Wilkes <jancsika@yahoo.com mailto:jancsika@yahoo.com> Subject: Re: [PD] finding out if an abstraction instance exists Date: January 11, 2016 at 12:24:44 PM MST To: IOhannes m zmölnig <zmoelnig@iem.at mailto:zmoelnig@iem.at>, "pd-list@lists.iem.at mailto:pd-list@lists.iem.at" <pd-list@lists.iem.at mailto:pd-list@lists.iem.at> Reply-To: Jonathan Wilkes <jancsika@yahoo.com mailto:jancsika@yahoo.com>
I can think of two ways:
something like canvas_find method -- walk through every toplevel looking for a canvas_class of the relevant filename/binbuf/whatever
take the abstraction's name, add "pd-" to the front, create a t_symbol* from
it and go spelunking in the symbol's s_thing for receivers. But this isn't foolproof, as someone can easily create a receiver with the same name as an abstraction.
I encapsulated #1 in the pd-l2ork introspection objects [pdinfo] and [canvasinfo].
-Jonathan