[PD] storing pointers (in C) to other objects?
mike at ozmediasolutions.com
Wed Mar 16 17:20:51 CET 2005
I have an custom object that I coded, and I would like to store pointers
to other instances of this object within the dataspace.
To clarify, pretend I have 2 instances of the obj on my canvas. Then I
receive an input to obj_1 that calls a specific method. I would like
that method to be able to look into that object's dataspace to see if it
is 'linked' with any other objects, and execute methods in those objects.
I don't want to use regular pd send/receive/connections/etc because I
want to be able to dynamically specify these 'links' during runtime.
Also, this technique should also hold if the objects are not on the same
canvas (possibly anywhere in other patches). I guess this means that I
have to pass an ID of some sort when I want to specify a connection. For
example, if each object has a unique numeric ID, I would send a message
'connect 12345' to an object, and a handler would search the entire pd
object space for an object that had that ID and then store a pointer to
that object in the dataspace.
Is this possible? Does anyone know how I can search the entire pd object
space? How do I find these pointers?
More information about the Pd-list