Hi Philipp. (2nd time for you, 1st time for the list)
the connect message needs the the object numbers of the first and second object. how do i know my object numbers? i assume it depends on the creation order (1st, 2nd ...)
your rigth, here it is from Miller : "connect object-number outlet-number object-number inlet-number". The four numbers count from 0 up; objects are bnumbered in the order they're created. So "connect 1 3 0 0" would be "connect the fourth outlet of the second object to the first inlet of the first object".
but is there a way to get an object number without knowing its point of creation in a patch?
I don't think so, but I'm not a specialist of it....
Here what i've found on the list that looks realeted : |Does anyone know of a way to dynamically destroy an object using the |"send pd-xxx" approach? Also, is there anyway to disconnect objects |dynamically?
did you find/make anything? i ve only managed to selectall,menu_cut and start over from scratch. ;)
the problem with both destroying and disconnecting is getting the reference to the object. you could either emulate a mouseclick, or work out how to access the stuff via canvas/glist directly,
|I agree... there's no way (as yet, anyway) to get a pointer to the last |created object in a patch (for instance) so taht you could store it and use |it later to delete the object. Doing this well would be somewhat
complicated
|and would make the "pointer", etc., objects run slower (stale pointer
checking
|would be harder.) | |An easier hack would be to give canvases a way to delete objects by
numerical
|index... would that help?
that would totally help, since, given you re building patches from within pd, you have to keep track of the object-positions anyway, in order to make connections.
Hope this help you.
Damien HENRY.