From 2aff47ef1621b0df710ce00dec276bc75fe52129 Mon Sep 17 00:00:00 2001 From: Till Date: Tue, 28 May 2024 20:44:09 +0200 Subject: [PATCH 1/2] added currentSettingsAsCompileString --- classes/extNodeProxyDocument.sc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 classes/extNodeProxyDocument.sc diff --git a/classes/extNodeProxyDocument.sc b/classes/extNodeProxyDocument.sc new file mode 100644 index 0000000..0fce9ef --- /dev/null +++ b/classes/extNodeProxyDocument.sc @@ -0,0 +1,15 @@ ++ NodeProxy { + currentSettingsAsCompileString { | envir | + var nameStr, accessStr = "a"; + var isAnon; + + envir = envir ? currentEnvironment; + + nameStr = envir.use { this.asCompileString }; + isAnon = nameStr.beginsWith("a = "); + if (isAnon.not) { accessStr = nameStr }; + + ^this.nodeMap.asCode(accessStr, true); + + } +} \ No newline at end of file From bb989a5790e95dab8b38db43f021af144a1144e2 Mon Sep 17 00:00:00 2001 From: Till Date: Tue, 12 Nov 2024 11:19:04 +0100 Subject: [PATCH 2/2] added `accessStr` and streamlined --- classes/extNodeProxyDocument.sc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/classes/extNodeProxyDocument.sc b/classes/extNodeProxyDocument.sc index 0fce9ef..f2de694 100644 --- a/classes/extNodeProxyDocument.sc +++ b/classes/extNodeProxyDocument.sc @@ -1,7 +1,6 @@ + NodeProxy { - currentSettingsAsCompileString { | envir | - var nameStr, accessStr = "a"; - var isAnon; + accessStr { | envir | + var accessStr = "a", nameStr, isAnon; envir = envir ? currentEnvironment; @@ -9,7 +8,11 @@ isAnon = nameStr.beginsWith("a = "); if (isAnon.not) { accessStr = nameStr }; - ^this.nodeMap.asCode(accessStr, true); + ^accessStr; + } + currentSettingsAsCompileString { + ^this.nodeMap.asCode(this.accessStr, true); } + } \ No newline at end of file