38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#endif
static OFApplication *app = nil;
static void
atexit_handler(void)
{
[[app delegate] applicationWillTerminate];
}
int
of_application_main(int *argc, char **argv[], Class cls)
{
OFApplication *app = [OFApplication sharedApplication];
id <OFApplicationDelegate> delegate = [[cls alloc] init];
[app setArgumentCount: argc
andArgumentValues: argv];
[app setDelegate: delegate];
[app run];
[(id)delegate release];
return 0;
}
@implementation OFApplication
+ sharedApplication
{
if (app == nil)
|
>
>
|
>
>
<
<
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#endif
static OFApplication *app = nil;
static void
atexit_handler(void)
{
id <OFApplicationDelegate> delegate = [app delegate];
[delegate applicationWillTerminate];
[(id)delegate release];
}
int
of_application_main(int *argc, char **argv[], Class cls)
{
OFApplication *app = [OFApplication sharedApplication];
id <OFApplicationDelegate> delegate = [[cls alloc] init];
[app setArgumentCount: argc
andArgumentValues: argv];
[app setDelegate: delegate];
[app run];
return 0;
}
@implementation OFApplication
+ sharedApplication
{
if (app == nil)
|