(moving this to pd-dev)
On 09/12/2016 07:57 PM, Orm Finnendahl wrote:
I don't know of any other way to accomplish the task.
afaik, the "new_anything" method is simply pd_objectmaker's fallback method (for creating objectclasses it doesn't know yet).
since Pd>=0.47, abstractions are loaded like ordinary externals (that is: once known, they are stored in the pd_objectmaker's methodtable.
in any case: just sending a message to pd_objectmaker (using pd_typedmess()) should do the trick.
Is there a recommended way to load abstractions internally?
what does "loading internally" mean for you?
in any case, i don't think there's anything "official". for simply creating/instantiating/connecting abstractions within a patch, you might check out my "patcherize" external from [punish].
for instantiating abstractions in a more convoluted way, use a known-to-do-that object, like [clone] (incidentally [clone] uses pd_typedemess() for instantiating abstractions)
gmasdr IOhannes
[punish] https://git.iem.at/pd-gui/punish
On 09/12/2016 08:08 PM, IOhannes m zmölnig wrote:
for instantiating abstractions in a more convoluted way, use a known-to-do-that object, like [clone] (incidentally [clone] uses pd_typedemess() for instantiating abstractions)
just for the record: [clone] is part of Pd>=0.47 and it's sources can be found e.g. here: https://sourceforge.net/p/pure-data/pure-data/ci/master/tree/src/g_clone.c
gmards IOhannes
Hi IOhannes,
Thanks, but still no luck:
Calling this segfaults:
/* this is called when foo1 gets the message, "rats". */ void foo1_rats(t_foo1 *x) { t_atom at; SETFLOAT(&at, 10); pd_typedmess(&pd_objectmaker, gensym("test"), 1, &at); }
There must be something completely stupid, I'm missing...
-- Orm
Am Montag, den 12. September 2016 um 20:55:34 Uhr (+0200) schrieb IOhannes m zmoelnig:
On 09/12/2016 08:08 PM, IOhannes m zmölnig wrote:
for instantiating abstractions in a more convoluted way, use a known-to-do-that object, like [clone] (incidentally [clone] uses pd_typedemess() for instantiating abstractions)
just for the record: [clone] is part of Pd>=0.47 and it's sources can be found e.g. here: https://sourceforge.net/p/pure-data/pure-data/ci/master/tree/src/g_clone.c
gmards IOhannes
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev