I decided that since I have a little time, I'd move away from the Windows world and start learning some Mac application development. Things have changed a bit since I was using Inside Mac in 85.
So, I find an open source project online. The Xcode project file doesn't really import right, so I create a new project, and pull in the source files. It builds, but when I run it, I get a small empty window. Obviously the call to NSApplicationMain() isn't going anywhere. Not understanding where that gets set up, I dig through the code. I find what is supposed to be the main loop. I trace it back through a couple of calls to:
I don't really understand all the hoops at this point, but I'm still trying to figure out why 'playGame' isn't getting called.
I look at the info.plist file, and it looks normal. On a hunch, I go in to the project settings, and change the 'Product Name' to the name of the original open source app. It builds and runs like it is supposed to.
So what I'm trying to figure out, is the disconnect between something like the app name, and how that matters to the notification getting sent that runs the main loop. I've looked through all the code, and don't seem to find anything that looks like it's name dependent.
So, I find an open source project online. The Xcode project file doesn't really import right, so I create a new project, and pull in the source files. It builds, but when I run it, I get a small empty window. Obviously the call to NSApplicationMain() isn't going anywhere. Not understanding where that gets set up, I dig through the code. I find what is supposed to be the main loop. I trace it back through a couple of calls to:
Code:
@interface MyDriver : NSObject {
IBOutlet Viewport *theDisplay;
IBOutlet NSButton *theButton;
IBOutlet NSMenu *fileMenu;
IBOutlet NSWindow *theWindow;
}
- (IBAction)playGame:(id)sender;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
- (void)windowDidResize:(NSNotification *)aNotification;
I don't really understand all the hoops at this point, but I'm still trying to figure out why 'playGame' isn't getting called.
I look at the info.plist file, and it looks normal. On a hunch, I go in to the project settings, and change the 'Product Name' to the name of the original open source app. It builds and runs like it is supposed to.
So what I'm trying to figure out, is the disconnect between something like the app name, and how that matters to the notification getting sent that runs the main loop. I've looked through all the code, and don't seem to find anything that looks like it's name dependent.