Roman Haefeli wrote:
On Tue, 2008-08-05 at 19:18 -0500, Ricardo DueƱas Parada wrote:
Hello list,
I am working with messages to create objects inside a patch, I think I have solved the creation of the objects, but I don't know how to connect them. When I create an object, its "number" depends on the objects created before, and the order of creation, how can I know what is the number of a certain object?
With number I mean the fields A and B in the message [connect A X B Y( , I already know what A, B, X and Y are, but I don't know how to know A and B, for the objects I want to connect.
Do you know what other things can I modify in a patch through messages?
dynamic object creation is not yet officially supported and probably therefore not well documented.
But isn't that how all pd patches get loaded, sending the lines of the pd file t pd?
anyway, I can also recommend [dyn] for doing stuff like that. osx and windows binaries at http://grrrr.org/ext/beta/pd/ marius.
the only way to know the number id of each object is by implementing a reference counter yourself, that counts up by one each time you create an object. however, this will get quite tricky as soon as you start to remove objects, because then need to keep track, _which_ object you removed.
personally, i recommend to not bother with 'connect' messages at all, but to use [send]s and [receive]s (and their tilde counterparts) in your dynamically created abstractions. it makes dynamic creation much more feasible and labelling stays consistent, even when removing objects.
afaik, there is a section called pd-msg-05 somewhere in the help browser of pd-extended, that has a list and examples of messages to pd and canvasses.
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list