Skip to main content
z_abdulgalimov
Inspiring
December 11, 2014
Question

Create FRE Object in delegate functions

  • December 11, 2014
  • 0 replies
  • 237 views

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?

This topic has been closed for replies.