Out of curiosity, why are external .js files not allowed inside a namespace?
-
I don't have any namespaces inside the .js file. Logically, why would I not be able to include it?
If I can't, I'll just have to copy its contents into the namespace, which seems to counteract the tidiness of "include" files. -
@VirtualVirgin I don't know actually.
In this case I would put whatever content is inside your
js
file into a namespace calledBeamGroupFormatsLut
and include iton init
(or within your Notation.js file but outside of the namespace).Then you can reference it easily and it maintains modularity and neatness.
-
@VirtualVirgin Just doing some reading in the documentation and I found that it says that namespaces cant be nested. From my understanding, I think namespace and .js are synonymous in HISE so that would mean that you cant put a .js file inside of another .js file. Might just be built in security measure to avoid too deep of nesting.
or I could be totally bonkers. lol.
-
@Chazrox said in Out of curiosity, why are external .js files not allowed inside a namespace?:
I think namespace and .js are synonymous in HISE
They're different. You can have several namespaces or no namespaces in a js file.
-
@d-healey hmm
-
I think the reason is just that the JS parser can‘t build namespaces across multiple files, but I don’t think there‘s a valid reason for touching that part of the codebase…