Hi,
I downloaded the example code for creating c-level extensions in flash CS3 (via jsfl) and successfully created a new bundle (in XCode) and tested it in flash. But, when I attempt to run JS_ExecuteScript, I get the error " 'L__FILE__' undeclared (first time used in this function) ". I know I am using JS_ExecuteScript correctly because I have a working version on the PC.

The file mm_jsapi.h defines JS_ExecuteScript as:

#define JS_ExecuteScript(c, o, s, z, r) \
(mmEnv.executeScript ? (*(mmEnv.executeScript))(c, o, s, z, _T(__FILE__), \
__LINE__, r) : JS_FALSE)

If I define:
#define MYFILE _T(__FILE__)
in the same file (without using JS_ExecuteScript, it works fine without any errors.

It seems that somehow when the definition of _T(__FILE__) is loaded inside mm_jsapi.h, it generates the same error.

If I remove the _T from the line, it compiles (but of course it doesn't work). From these tests, it seems to be the L that is the problem. I do not know enough about the inner workings of the code to know how to fix this and I am surprised that running this from the example program hasn't been a problem for anyone else.

Here is the exact code:

wchar_t teststring[40] = L"fl.trace('hi mac')";
JSBool testfunction(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval){
JS_ExecuteScript (cx, obj, teststring, 0, rval);
}
Again, this code works fine without JS_ExecuteScript and it works with JS_ExecuteScript on the PC.

I am using XCode 2.4 with MAC OSX 10.4.6.

Does anyone have any ideas or has anyone successfully ran JS_ExecuteScript on a MAC in CS3?
Thanks,
JM