Highlighted

Create FRE Object in delegate functions

Explorer ,
Dec 11, 2014

Copy link to clipboard

Copied

UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Titlte"

                                                    message:@"my message"

                                                   delegate:self

                                          cancelButtonTitle:@"OK"

                                          otherButtonTitles: nil];

[alert show];

....

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

{

    NSString* string = @"123";

    FREObject asString = nil;

    const char* utf8String = string.UTF8String;

    unsigned long length = strlen( utf8String );

    FREResult res = FRENewObjectFromUTF8( length + 1, (uint8_t*) utf8String, &asString );

    NSLog(@"res = %d", res);

}

In function clickedButtonAtIndex res = FRE_WRONG_THREAD

Why is that?

TOPICS
Development

Views

137

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Create FRE Object in delegate functions

Explorer ,
Dec 11, 2014

Copy link to clipboard

Copied

UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Titlte"

                                                    message:@"my message"

                                                   delegate:self

                                          cancelButtonTitle:@"OK"

                                          otherButtonTitles: nil];

[alert show];

....

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

{

    NSString* string = @"123";

    FREObject asString = nil;

    const char* utf8String = string.UTF8String;

    unsigned long length = strlen( utf8String );

    FREResult res = FRENewObjectFromUTF8( length + 1, (uint8_t*) utf8String, &asString );

    NSLog(@"res = %d", res);

}

In function clickedButtonAtIndex res = FRE_WRONG_THREAD

Why is that?

TOPICS
Development

Views

138

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 11, 2014 0

Have something to add?

Join the conversation