pancake
2nd February 2010, 11:35
Can I 'evaluate' one QtScript .js file from within another?
The only way I have found is to write a native C++ function that reads a file and returns a string, export this function to QtScript, then "eval" the string within the QtScript. Just wanted to check I wasn't missing some obvious 'dofile' method in QtScript.
This is for an application that makes heavy use of QtScript, allowing (technical!) users to develop complex scripted environments involving multiple files and functions.
Thanks
The only way I have found is to write a native C++ function that reads a file and returns a string, export this function to QtScript, then "eval" the string within the QtScript. Just wanted to check I wasn't missing some obvious 'dofile' method in QtScript.
This is for an application that makes heavy use of QtScript, allowing (technical!) users to develop complex scripted environments involving multiple files and functions.
Thanks