Objective C (Cocoa) question

I was wondering if it was possible to write the Hello World program in Objective C
using a GUI program without using a nib file. If it is, could someone please post the program.

Gosh, I don’t want to write a whole program, but yeah, you can. The thing is, though, Objective-C is just the language; it’s not the Cocoa API which you’re probably mostly attributing NIB’s to. You could just as well write a Carbon API Objective-C “hello world” program. And now your question is vague, because aside from the Carbon/Cocoa question is do you really need a NIB if you’re target is standard output, which would be a perfectly good target for things such as the command line.

That said, assuming you mean Objective-C for Cocoa and the Mac human interface, I’m still going to back out, because I don’t have the solution right at hand (i.e., I’m too lazy, but you could call me a jerk if you want). As a tip towards doing it yourself, though, you can easily just create instances and set the properties for all of the controls that will give you your window and text box. If you’re just learning Cocoa, I highly recommend “Cocoa Programming for Mac OS X” by Hillegass. Look up Big Nerd Ranch, and they may have sample code for the very thing you’re looking for.

I just wanted to compare different GUI programs for how they would implement the Hello World program. I’ve already done it for Java(Swing) and C++ (qt) and just wanted to see how Objective-C (Cocoa) would do it. Both Java and C++ can do it in only 1 file, so I was hoping Objective-C could as well. I don’t want to write the output to the console since a web site already exists that compares console Hello World programs.