[PD] finding out if an abstraction instance exists

Jonathan Wilkes jancsika at yahoo.com
Mon Jan 11 20:24:44 CET 2016


I can think of two ways:
1) something like canvas_find method -- walk through every toplevel looking for a canvas_class of the relevant filename/binbuf/whatever
2) 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
 

    On Monday, January 11, 2016 1:47 PM, IOhannes m zmölnig <zmoelnig at iem.at> wrote:
 

 On 01/11/2016 07:07 PM, Dan Wilcox wrote:
> Is there a pd messages / C api call to query whether any instance of a abstraction exists? I mainly need to know if a specific object is alive somewhere and without any global variable messaging etc as I don’t want to modify the abstraction itself.

"exists" as in "instantiated" or "lives on the filesystem" (either in
Pd's search path or outside it?)?



gfsmrda
IOhannes

_______________________________________________
Pd-list at lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160111/03f16ea9/attachment.html>


More information about the Pd-list mailing list