Hi, someone just fixed my code, it working fine. But how do I inspect in Flex Builder where I have installed CDT and MingGW?
On Tue, Dec 27, 2011 at 9:59 PM, Tomislav <i...@svemir.net> wrote: > ** > > > Did you try inspecting FREResut values from FREGetObjectAsUTF8 calls? > > FREREsult res = FRENewObjectFromUTF8(strlen(strAll)+1, (uint8_t *)strAll, > &result); > printf("%d", res ); > > > --- In flexcoders@yahoogroups.com, "yanlilei64" <yanlilei64@...> wrote: > > > > No one know? > > > > > > --- In flexcoders@yahoogroups.com, "yanlilei64" <yanlilei64@> wrote: > > > > > > I want to pass the "James" string to getTestString function, the first > > > time, the string could return "This is James" without any error. > > > Subsequently after the button is click, the application will just > > > hang/crash (grey out), it seem there some bugs in this code? > > > > > > Screenshot: http://imagetwist.com/7896zupwtu97/a.jpg.html > > > > > > Code: > > > > > > FREObject getTestString(FREContext ctx, void* funcData, uint32_t argc, > > > FREObject argv[]) { > > > FREObject result; > > > > > > //Temporary values to hold our actionscript code. > > > uint32_t albumLength; > > > const uint8_t *str; > > > uint8_t *strAll; > > > > > > //Turn our actionscrpt code into native code. > > > FREGetObjectAsUTF8(argv[0], &albumLength, &str); > > > strcpy(strAll,"This is "); > > > strcat(strAll,str); //str is "James" > > > > > > //const char *str = "this is "; > > > FRENewObjectFromUTF8(strlen(strAll)+1, (uint8_t *)strAll, > > > &result); //UTF8 to object and return > > > > > > return result; > > > } > > > > > > > >