Page 1 of 1

Recursively embed #include

Posted: January 14th, 2014, 11:38 am
by ernpchan
Is it possible to use #include through scripts that get called through a chain? For example, I have 3 files (Parent, Child, Functions).

Parent executes Child via the eval(); code.

Child is a standalone jsx file that uses #include to import functions that exist in Functions.jsx.

If I run Child on its own the script executes. If I execute it through eval inside of Parent, nothing happens.

Re: Recursively embed #include

Posted: January 14th, 2014, 12:08 pm
by ernpchan
Found the answer. Use this:

Code: Select all

$.evalFile(path_to_your_file)
Instead of eval(File);