extendexample.zip

I've seen this idea come up quite a bit recently, so i thought I would throw out what I learned from making Virgo.

One way to dynamically create creation arguments is to pass the name of the abstraction you want, an id (identifying the parent abstraction), and the number of times you want to create it to a container abstraction all as creation arguments.

Then inside the container, clone that main abstraction that many times using the id as the third argument.

So...[clone absname numTimes Id] or put more specifically\

[clone $1 $2 $3]

then inside the abs clone add:

loadbang
f $1 (the clone index)
f $2 (the main object id)

and a named dynamic send such that

|
pack f f
|
[$2-$1-name(

So, on receiving, you get all of the sends as

the id - the idx of the clone - and the name.

If you do it this way, writing the names (though standardized) for sends such catch~ or throw~ become available.

For example see the attached zip.

Stay healthy.

p.s. if this doesn't help...or just makes you scratch your head as to why you would do this, perhaps if nothing else it will trigger some fresh ideas for you.

peace through sharing love through music-f-small.jpg