Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8509609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:28:50+00:00 2026-06-11T03:28:50+00:00

When clicking on a button, I’d like to display a sheet with an email+password

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:28:52+00:00Added an answer on June 11, 2026 at 3:28 am

    The view does not absolutely have to have a title bar.

    See
    Why NSWindow without styleMask:NSTitledWindowMask can not be keyWindow?

    Which states: If you want a titleless window to be able to become a key window, you need to create a subclass of NSWindow and override -canBecomeKeyWindow as follows:

    - (BOOL)canBecomeKeyWindow {
        return YES;
    }
    

    This worked for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how to connect to email while clicking on button in android
Code like this with button in footer template after clicking that button error appears:
How to display the file(*.txt) while clicking the command button How to display the
I use watir for testing in RadRails IDE.After clicking button Delete appears window Message
On clicking a button, I want the selected rows to be inverted (non-selected rows
Iam in parent view while clicking the button in the parent view I want
I have an updatepanel which after clicking one button is submitting the page. The
I need to call a function by clicking a button. The button is on
I want to send my Application to background simply clicking on Button inside my
I m trying to refresh the screen on clicking a button so i want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.