I may have asked this on another thread of yours, but please identify your OS and Xcode versions.
Also tell us how many other Mac apps you've written, either from scratch or by taking an existing app and modifying it.
What tutorials or books have you completed? Did you do all the exercises listed in the books?
The AMSerialPort download contains an Xcode project that compiles under OS X 10.6.8 and Xcode 3.2.1. That's the Snow Leopard configuration I have, and I just built and ran it. I have no additional serial-ports on this config right now, so it only showed the builtin /dev/cu.* devices. It launched and presented a list as expected, but I went no further.
The source is older than 10.6, because it doesn't use the NSApplicationDelegate protocol, which was first present in 10.6:
http://developer.apple.com/library/...ionDelegate_Protocol/Reference/Reference.html
The connection between NSApplication and the AMSerialTest project's AppController object is made in the nib file. Or at least that's how it appears in my cursory look at the project.
Unfortunately, the AppController class provided doesn't implement any of the NSApplicationDelegate protocol's methods, so that connection may or may not really work. If it does, then something you did broke it, and you should go back to the original project (unzip it again), and try building it exactly as provided. Then add exactly one method containing an NSLog() statement, preferably one of the app-launch methods, and see if that method is called. This is the
Simplest Thing That Could Possibly Work, a useful debugging principle to keep in mind.
If the single app-launch delegate method isn't called, as evidenced by the absence of log output, then my guess is that the original AMSerialTest project doesn't have the app-delegate properly connected. However, if it is called, as evidenced by log output, then I'd guess you broke something somewhere during the course of your modifications.
When I add this method to my copy of an otherwise virgin AppController.m:
Code:
-(void)applicationDidFinishLaunching:(NSNotification *) notice
{
NSLog( @"Hello from did finish launching" );
}
and change nothing else, I see the expected output in my log. Therefore, I conclude that the AMSerialPort project, as obtained from the following website, does indeed have the app-delegate connection set correctly. Tested on OS 10.6.8, Xcode 3.2.1.
http://www.harmless.de/cocoa-code.php
Based on the above, I suspect you broke something in the nib, or somehow modified it so an instance of type AppController isn't being set as the app-delegate.
I don't know a simple way to fix this, so I suggest learning how app-delegates work using a simpler project, perhaps one of Apple's sample code projects linked from the NSApplicationDelegate class reference.
It's also conceivable that the AMSerialTest project doesn't work on your OS and Xcode version. Not knowing what those are, I won't speculate further. However, since I outlined a simple modification that does work, and does demonstrate that an app-delegate is set, you could try that with a virgin copy of your AMSerialTest and see what happens.
If the simple change to AMSerialTest works, then you might try copy-pasting your code into it, in small pieces. After every change, you should rebuild, retest, and confirm everything works correctly. That's another useful debugging principle: build and test often.
Based on everything you've posted so far, I think you're in way over your head, and way beyond your proficiency level. You're trying to create something without understanding the foundations of what it's built on. For example, the building-blocks of delegation (app-delegate in particular), or even the basic syntax (the semicolon bug and the fact you felt it necessary to kludge around it rather than ask someone what the problem might be). You need to start simpler, make those simpler things work reliably, understand everything they do, and then try the more complex program.
When I was working as an instructor many years ago, I told students to write at least 4 separate programs that were simpler than the one they wanted to write first. I also recommended that they choose
one facet of the program they wanted to write, and incorporate just that one facet into a separate program. Once they got it working, they could go on to write another program incorporating a different facet. This got them to see that things are often much more complex than first envisioned, and also got them to see the value of making simplified test programs.
Another possible path is to switch to a more forgiving language and dev platform, such as RealBasic. If your goal is mainly to write a program for your antenna rotor, it may start a lot closer to that goal than Xcode is (or even than Xcode + AMSerialPort).
EDIT
I just noticed your putSettings method is writing to the app-bundle. Do not do this. Do not attempt to do this. There will come a time when it will fail, and you won't know why.
Use the NSUserDefaults class for storing simple settings and non-volatile data.