Changeset 36595 for lang/objective-cplusplus
- Timestamp:
- 02/02/10 21:21:10 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/tmp/onmainthread.cpp
r36594 r36595 100 100 } 101 101 } 102 // [NSException raise:@"Application_will_terminate" format:@"Someone requested to terminate application"]; 102 103 103 104 - (void)start { … … 131 132 } 132 133 134 NSString* name = [[[NSThread currentThread] threadDictionary] 135 objectForKey:@"my_name"]; 136 NSLog(@"thread created [%s]", [name UTF8String]); 137 133 138 NSWindow* window = [NSWindow alloc]; 134 139 [window initWithContentRect: NSMakeRect(100, 100, 200, 200) … … 140 145 [window makeKeyAndOrderFront: nil]; 141 146 142 [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]]; 143 144 //[NSApp terminate:nil]; 147 //[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]]; 148 [NSApp run]; 145 149 } 146 150 NS_HANDLER … … 152 156 } 153 157 NS_ENDHANDLER 154 155 [NSException raise:@"Application_will_terminate" format:@"Someone requested to terminate application"];156 158 157 159 [pool release]; … … 272 274 273 275 mainTask = [[[MainTask alloc] init] retain]; 274 [mainTask performSelectorOnMainThread:@selector(start) withObject:nil waitUntilDone:NO]; 276 //[mainTask performSelectorOnMainThread:@selector(start) withObject:nil waitUntilDone:NO]; 277 [mainTask start]; 275 278 276 279 //[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]]; 277 [[NSRunLoop currentRunLoop] run];280 //[[NSRunLoop currentRunLoop] run]; 278 281 //[NSApp run]; 279 282 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)