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 <it@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:
> >
> > 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;
> > }
> >
>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
MARKETPLACE
.
__,_._,___
0 comments:
Post a Comment