1 #include <UIKit/UIAlertView.h>
4 #include "appdelegate.h"
7 @implementation BootstrapDelegate
12 - (void)ShowAlert:(NSString *)text withTitle:(NSString *)title
14 self.alert = [[UIAlertView alloc] initWithTitle:title message:text delegate:self
15 cancelButtonTitle:@"Abort" otherButtonTitles:nil];
23 self.rc = bootstrap(_argc, _argv);
25 /* Fall down into event loop. We have alert view here. */
28 - (void)alertView:(UIAlertView *)av didDismissWithButtonIndex:(NSInteger)choice
30 /* I know it's considered bad. But what else to do here? Restart? */
34 - (void)applicationDidFinishLaunching:(UIApplication *)app
37 * This causes RunBootstrap method to be called after all internal UIKit setup is complete,
38 * when event handling loop is entered
40 [self performSelector:@selector(RunBootstrap) withObject:nil afterDelay:0.0];
43 /* The following are placeholders for now. Should likely be forwarded to AROS via HostInterface. */
45 - (void)applicationWillTerminate:(UIApplication *)application
50 - (void) applicationWillResignActive:(UIApplication*)application
55 - (void) applicationDidBecomeActive:(UIApplication*)application