hi all, 

What I do when I have abstractions that I can't predict how they will be patched in the future and order is important, is to have the loading order as an argument for abstractions at loading time and connect that variable to a del, so that I have del 1, del 2, del 3, etc. 

In fixed patches (that won't change in the future) I use something like:

[loadbang]
[t  b  b]
|         \         
[s lb1] [s lb2] [etc....]

J


On Wed, Feb 25, 2009 at 2:09 PM, Robert Gründler <doobre@gmail.com> wrote:
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
>


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



--
Jaime E Oliver LR

joliverl@ucsd.edu
www.realidadvisual.org/jaimeoliver
www-crca.ucsd.edu/
www.realidadvisual.org

858 202 1522
9168 Regents Rd. Apt. G
La Jolla, CA 92037
USA