Recursively embed #include

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
ernpchan
Posts: 56
Joined: February 8th, 2010, 11:27 pm

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.
ernpchan
Posts: 56
Joined: February 8th, 2010, 11:27 pm

Found the answer. Use this:

Code: Select all

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