Well, none of the actual window elements are handled in your piece of code, your code just initializes and shows the window. (I've just had a quick scan through, so I'm assuming that it works)
If you want to, for example, display text in a window, the simplest way is to use an NSTextField
.
Very simple instructions:
- Drag and drop a Label item from the Interface Builder library into your window.
- Drag and drop a button item from the Interface Builder library into your window.
- In XCode, in your window controller, create an IBOutlet for your label, e.g. messageLabel
- In XCode, in your window controller, create an IBAction for your label, e.g. changeLabel
- In Interface Builder, drag and drop an "object" into your document. (Shortcut = CMD + 0)
- Under the Identity tab, change the class to AXWindowController. (Shortcut = CMD + 6)
- Ctrl + drag from the object to the label, choose the outlet messageLabel.
- Ctrl + drag from the button to the object, choose changeLabel.
Now, to display text when you press the button, you would add code to the changeLabel IBAction to do so.
e.g. [messageLabel setTitleWithMnemonic:@"blah"];
And Finally, if you want it to automatically display text, you might as well just change the label content in Interface Builder / place the code in the windowDidLoad method in your controller.
That to me is pretty much the simplest way for you to do it. However, I recommend you read some books / tutorials on Cocoa and Objective-C before delving into harder stuff.