get abstraction name

Jul 16, 2011 at 9:32pm

get abstraction name

How do I get the name (filename) of an abstraction inside itself?

Actually, I want a [receive] inside the abstraction automatically set to the name of the abstraction, when it’s loaded.

If I use [patcherargs] triggered by a loadbang inside a subpatcher I get its name, but with abstractions that doesn’t work.

How do I do that?

best, frank

#58049
Jul 17, 2011 at 10:02am

Hallo Frank,

you’ll need to use js with this code:


outlets = 1;

function bang() {
outlet(0,this.patcher.name);
}

But for your specific problem, I’d use a #1 argument in the abstraction: so it becomes possible to instantiate abstractions with different [receive].

#208492

You must be logged in to reply to this topic.