When clicking on a button, I'd like to display a sheet with an email+password prompt with options to save and cancel. The UI is all set up, the actions are in place, and the sheet appears and cancels as expected. The problem is that I can't edit either of the NSTextFields at runtime; they appear to disabled, and the OS error sound plays on every key press when the sheet is open. I read on SO that UIActionSheet is appropriate, but this is not an iOS app.
The textfields are enabled, and had previously been working in another panel. I made sure that the IBAction links are intact, but I'm otherwise not even sure how to troubleshoot.
What about a sheet would cause an otherwise healthy NSTextField to refuse input?
// show the sheet
-(IBAction)showAccount:(id)sender {
[NSApp beginSheet:accountWindow
modalForWindow:prefsWindow
modalDelegate:self
didEndSelector:NULL
contextInfo:NULL];
}
// cancel/hide the sheet
-(IBAction)cancelAccount:(id)sender {
[NSApp endSheet:accountWindow];
[accountWindow orderOut:nil];
}
Edit: I've just discovered that I can right-click and paste text into each field, but I can't select or delete. It seems like the NSTextFields aren't getting focus and don't receive keyboard input like they usually would. I also forgot to mention that my Save button calls and executes its related method properly.