the problem i'm facing is the following:
i'm trying to write an extension to pd which allows people to create custom gui objects that can communicate with the underlying pd patch.
So far i've a prototype where i use Gtk+ for the gui, and the communication works fine so far.
But that's where the loading order of objects become important. First i need to create the canvas object in pd, and then i can create additional objects which add user interface objects inside the gtk canvas.
If i can't rely on a specific loading order in future implementations of pd, a workaround would be that a simple gtk gui widget would first check if there's a canvas existing, and if that's not the case, it needs to create one itself. But i'm not sure if i can create pd objects in a patch programmatically.
I'd also be glad about feedback from the pd community if such an extension would be considered useful in general.
best
-robert
Frank Barknecht wrote:
Hallo, Robert Gr?ndler hat gesagt: // Robert Gr?ndler wrote:
For example when i create a patch with 2 objects that are not connected in any way, in which order will they be created by pd when the patch is loaded ?
The order you created them, but it's very bad practice to rely on that, because it's an implementation detail that may change in future versions and it's generally error prone because you cannot see the creation order.
You can test this with an abstraction that prints something with a loadbang, like:
testme.pd:
[loadbang] | [f $1] | [print]
testme-for-real.pd:
[testme 1] [testme 2]
Then open testme-for-real.pd again.
Ciao