Jake
2003.12.03, 05:50 PM
Ok... I have had this working before in another instance, but it won't work now. Here is my controller.m code (or part of it)
gameView = [ [ glView alloc ] initWithFrame:[ glWindow frame ] colorBits:16 depthBits:34 fullscreen:FALSE ];
[self addSubview:gameView];
Here is the problematic code in glView.m
if (inputUp == 0 ) {
controller* gv = (controller*)[self superview];
NSLog(@"1");
[currentLevel release];
NSLog(@"2");
levelLoaded = FALSE;
NSLog(@"3");
[golfer release];
NSLog(@"4");
if (mainWindow == nil) {
NSLog(@"4.2");
if (![NSBundle loadNibNamed:@"mainMenu.nib" owner:gv] ) {
NSLog(@"Load of mainMenu.nib failed");
}
}
[gv restartMainMenu];
NSLog(@"4.5");
[mainWindow makeKeyAndOrderFront: nil];
NSLog(@"5");
[glWindow close];
NSLog(@"6");
gv->inGame = FALSE;
[self release];
Here is the console...
2003-12-03 18:35:11.931 GL Golf[1131] 1
2003-12-03 18:35:11.956 GL Golf[1131] 2
2003-12-03 18:35:11.971 GL Golf[1131] 3
2003-12-03 18:35:11.985 GL Golf[1131] 4
2003-12-03 18:35:12.003 GL Golf[1131] 4.2
2003-12-03 18:35:12.054 GL Golf[1131] Could not connect the action terminate: to target of class NSGrayFrame
2003-12-03 18:35:12.073 GL Golf[1131] Could not connect the action orderFrontStandardAboutPanel: to target of class NSGrayFrame
2003-12-03 18:35:12.090 GL Golf[1131] Could not connect the action hideOtherApplications: to target of class NSGrayFrame
2003-12-03 18:35:12.107 GL Golf[1131] Could not connect the action hide: to target of class NSGrayFrame
2003-12-03 18:35:12.121 GL Golf[1131] Could not connect the action unhideAllApplications: to target of class NSGrayFrame
2003-12-03 18:35:12.437 GL Golf[1131] *** -[NSGrayFrame restartMainMenu]: selector not recognized
2003-12-03 18:35:12.448 GL Golf[1131] *** -[NSGrayFrame restartMainMenu]: selector not recognized
glGolf has exited due to signal 11 (SIGSEGV).
Hum... any ideas?
gameView = [ [ glView alloc ] initWithFrame:[ glWindow frame ] colorBits:16 depthBits:34 fullscreen:FALSE ];
[self addSubview:gameView];
Here is the problematic code in glView.m
if (inputUp == 0 ) {
controller* gv = (controller*)[self superview];
NSLog(@"1");
[currentLevel release];
NSLog(@"2");
levelLoaded = FALSE;
NSLog(@"3");
[golfer release];
NSLog(@"4");
if (mainWindow == nil) {
NSLog(@"4.2");
if (![NSBundle loadNibNamed:@"mainMenu.nib" owner:gv] ) {
NSLog(@"Load of mainMenu.nib failed");
}
}
[gv restartMainMenu];
NSLog(@"4.5");
[mainWindow makeKeyAndOrderFront: nil];
NSLog(@"5");
[glWindow close];
NSLog(@"6");
gv->inGame = FALSE;
[self release];
Here is the console...
2003-12-03 18:35:11.931 GL Golf[1131] 1
2003-12-03 18:35:11.956 GL Golf[1131] 2
2003-12-03 18:35:11.971 GL Golf[1131] 3
2003-12-03 18:35:11.985 GL Golf[1131] 4
2003-12-03 18:35:12.003 GL Golf[1131] 4.2
2003-12-03 18:35:12.054 GL Golf[1131] Could not connect the action terminate: to target of class NSGrayFrame
2003-12-03 18:35:12.073 GL Golf[1131] Could not connect the action orderFrontStandardAboutPanel: to target of class NSGrayFrame
2003-12-03 18:35:12.090 GL Golf[1131] Could not connect the action hideOtherApplications: to target of class NSGrayFrame
2003-12-03 18:35:12.107 GL Golf[1131] Could not connect the action hide: to target of class NSGrayFrame
2003-12-03 18:35:12.121 GL Golf[1131] Could not connect the action unhideAllApplications: to target of class NSGrayFrame
2003-12-03 18:35:12.437 GL Golf[1131] *** -[NSGrayFrame restartMainMenu]: selector not recognized
2003-12-03 18:35:12.448 GL Golf[1131] *** -[NSGrayFrame restartMainMenu]: selector not recognized
glGolf has exited due to signal 11 (SIGSEGV).
Hum... any ideas?