I am developing a document based cocoa app. The startup interface is modeled after GarageBand: A welcome screen is displayed, which shows one of two alternating views (switched through a segmented control): "Create New Project" and "Browse Recent Projects". Each of this views is controlled by a dedicated NSViewController (in this case NewProjectViewController and RecentProjectsViewController).
To achieve this, I subclassed NSDocumentController so as to show this "Welcome screen" on startup instead of creating an empty document (An empty document doesn't make sense in my app until the user specifies certain minimum settings).
After launch/initial document creation, if the user chooses "Create New Project..." (i.e., new document), I display a window that reuses the same interface as the "New Project" tab in the Welcome screen, by instantiating the same NewProjectViewController and adding its view to the window.
In both cases, the view controller' view is created from a .xib. The view controller itself is instantiated programatically and its view is added to a preexisting subview of the window using -addSubview:.
The view for NewProjectViewController contains several editable NSTextField instances, and other controls.
The problem: All the NSTextField instances in the view controller's view will accept text input only the first time; From the second time on that the view is displayed, attempting to edit the text will produce the system alert sound. The text can be selected (highlighted), but not changed. Also, the text can be changed programmatically.
The other controls (popup buttons) can be changed without problem.
I have tried showing the "New Document" window from the beginning (instead of the Welcome screen), but the result is the same: The first time it works, the second it doesn't.
Is this a first responder problem?