Adding a Preferences Window to Your Application
Subject:   Question about opening windows
Date:   2002-08-09 14:45:32
From:   uglyface
I'm trying to write an application which has more than one window in it. I want a certain button to open a window, but unfortunately I can't get that to work. I've tried several different things:

[setupWindow makeKeyAndOrderFront:self];
[setupWindow makeKeyAndOrderFront:nil];
[setupWindow makeKeyAndOrderFront:setupWindow];
[setupWindow makeKeyAndOrderFront];

I have setupWindow defined as:
IBOutlet id setupWindow;

This is the outlet that I created by dragging the wire from the instantiated object to the window bar that has the close, miniaturize, and make big buttons on it.

Another peculiarity is that I have to define setupWindow in the file that I need to use it in. For some reason, importing the header file doesn't seem to work.

If you wish to reply to this, please e-mail the reply to, thank you. By the way, this is the best Cocoa tutorial I have seen yet. The tutorials provided by Apple are too simple, and are in .pdf form. I really hate .pdf files.