@@ -27,10 +27,11 @@ #import "OFApplication.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFThread.h" +#import "OFRunLoop.h" #import "OFNotImplementedException.h" #import "autorelease.h" @@ -293,16 +294,19 @@ #undef REGISTER_SIGNAL } - (void)run { + OFRunLoop *runLoop; + [OFThread _createMainThread]; + runLoop = [[[OFRunLoop alloc] init] autorelease]; + [OFRunLoop _setMainRunLoop: runLoop]; [delegate applicationDidFinishLaunching]; - for (;;) - [OFThread sleepForTimeInterval: 86400]; + [runLoop run]; } - (void)terminate { exit(0);