Em qui., 21 de jan. de 2021 às 14:33, Alexandre Torres Porres <
porres@gmail.com> escreveu:
> hmm, here's something I wasn't thinking, how to allow one to use the system inside abstractions.
IIRC, the symbolic name given as an argument to preset_hub sets the scope for all the preset_node objects with the same name in that canvas (or inside any child abstractions, so long as they don't include their own preset_hub inside with the same name). So basically the same way 'var' sets scope in Javascript. That's why "$0" isn't needed.
Digression-- there's also a new [ab] class in Purr Data which saves abstractions with the parent file, and it uses a "canvas private" scoping mechanism so that "$0" isn't needed. (Although in that case, file-level abstractions are in their own scope for the sake of sanity.)
I find it really handy and would like to find a way to make struct names similarly scoped. (Perhaps with a flag.)
-Jonathan